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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PH7PR21MB3116043F0A93BD5AD23C6C91CABBA@PH7PR21MB3116.namprd21.prod.outlook.com>
Date: Tue, 21 Nov 2023 17:37:11 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Souradeep Chakrabarti <schakrabarti@...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>, Long Li
	<longli@...rosoft.com>, "sharmaajay@...rosoft.com"
	<sharmaajay@...rosoft.com>, "leon@...nel.org" <leon@...nel.org>,
	"cai.huoqing@...ux.dev" <cai.huoqing@...ux.dev>,
	"ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
	"vkuznets@...hat.com" <vkuznets@...hat.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "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>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>
CC: Souradeep Chakrabarti <schakrabarti@...rosoft.com>, Paul Rosswurm
	<paulros@...rosoft.com>
Subject: RE: [PATCH V2 net-next] net: mana: Assigning IRQ affinity on HT cores



> -----Original Message-----
> From: Souradeep Chakrabarti <schakrabarti@...ux.microsoft.com>
> Sent: Tuesday, November 21, 2023 8:55 AM


> +	/* for each interrupt find the cpu of a particular
> +	 * sibling set and if it belongs to the specific numa
> +	 * then assign irq to it and clear the cpu bit from
> +	 * the corresponding avail_cpus.
> +	 * Increase the cpu_count for that node.
> +	 * Once all cpus for a numa node is assigned, then
> +	 * move to different numa node and continue the same.
> +	 */
> +	for (i = irq_start; i < nvec; ) {
> +
> +		/* check if the numa node has cpu or not
> +		 * to avoid infinite loop.
> +		 */
> +		if (cpumask_empty(cpumask_of_node(numa_node))) {
> +			numa_node++;

Since it starts at start_numa_node, we should consider roll over at the 
num_online_nodes() like the code below:
				if (numa_node == num_online_nodes())
					numa_node = 0;

It should also check empty for the next one.
And set node_count = 0; after the loop.

> +			if (++node_count == num_online_nodes()) {
> +				err = -EAGAIN;
Consider return -ENODEV, because we are not asking for retry.

> +				goto free_irq;
> +			}
> +		}

Thanks,
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ