lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <SN6PR02MB41577BCBF1D0DE9A526F66B0D4802@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Thu, 15 Aug 2024 17:25:49 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Haiyang Zhang <haiyangz@...rosoft.com>, Erni Sri Satya Vennela
	<ernis@...ux.microsoft.com>, KY Srinivasan <kys@...rosoft.com>,
	"wei.liu@...nel.org" <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "linux-hyperv@...r.kernel.org"
	<linux-hyperv@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: Erni Sri Satya Vennela <ernis@...rosoft.com>
Subject: RE: [PATCH v2] net: netvsc: Update default VMBus channels

From: Haiyang Zhang <haiyangz@...rosoft.com> Sent: Thursday, August 15, 2024 7:51 AM
> 
> > From: Michael Kelley <mhklinux@...look.com> Sent: Wednesday, August 14, 2024 7:57 PM
> >
> > From: Erni Sri Satya Vennela <ernis@...ux.microsoft.com> Sent: Wednesday, August 14, 2024 9:59 AM
> > >
> > > Change VMBus channels macro (VRSS_CHANNEL_DEFAULT) in
> > > Linux netvsc from 8 to 16 to align with Azure Windows VM
> > > and improve networking throughput.
> > >
> > > For VMs having less than 16 vCPUS, the channels depend
> > > on number of vCPUs. Between 16 to 32 vCPUs, the channels
> > > default to VRSS_CHANNEL_DEFAULT. For greater than 32 vCPUs,
> > > set the channels to number of physical cores / 2 as a way
> > > to optimize CPU resource utilization and scale for high-end
> > > processors with many cores.
> > > Maximum number of channels are by default set to 64.
> >
> > Where in the code is this enforced? It's not part of this patch. It
> > might be in rndis_set_subchannel(), where a value larger than
> > 64 could be sent to the Hyper-V host, expecting that the Hyper-V
> > host will limit it to 64. But netvsc driver code is declaring an array
> > of size VRSS_CHANNEL_MAX, and there's nothing that guarantees
> > that Hyper-V will always limit the channel count to 64. But maybe
> > the netvsc driver enforces the limit of VRSS_CHANNEL_MAX in a
> > place that I didn't immediately see in a quick look at the code.
> 
> Yes, netvsc driver limits the num_chn to be <=64:
> 
> #define VRSS_CHANNEL_MAX 64
> 
>         /* This guarantees that num_possible_rss_qs <= num_online_cpus */
>         num_possible_rss_qs = min_t(u32, num_online_cpus(),
>                                     rsscap.num_recv_que);
> 
>         net_device->max_chn = min_t(u32, VRSS_CHANNEL_MAX, num_possible_rss_qs);
> 
>         /* We will use the given number of channels if available. */
>         net_device->num_chn = min(net_device->max_chn, device_info->num_chn);
> 

OK, right.  Thanks for the identifying the code for me. :-)

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ