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] [day] [month] [year] [list]
Date:   Fri, 2 Nov 2018 17:53:08 +0000
From:   Long Li <longli@...rosoft.com>
To:     Michael Kelley <mikelley@...rosoft.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] genirq/affinity: Spread IRQs to all available NUMA nodes

> Subject: RE: [PATCH] genirq/affinity: Spread IRQs to all available NUMA
> nodes
> 
> From: Long Li <longli@...rosoft.com>  Sent: Thursday, November 1, 2018
> 4:52 PM
> >
> > --- a/kernel/irq/affinity.c
> > +++ b/kernel/irq/affinity.c
> > @@ -117,12 +117,13 @@ static int irq_build_affinity_masks(const struct
> irq_affinity *affd,
> >  	 */
> >  	if (numvecs <= nodes) {
> >  		for_each_node_mask(n, nodemsk) {
> > -			cpumask_copy(masks + curvec,
> node_to_cpumask[n]);
> > -			if (++done == numvecs)
> > -				break;
> > +			cpumask_or(masks + curvec, masks + curvec,
> node_to_cpumask[n]);
> > +			done++;
> >  			if (++curvec == last_affv)
> >  				curvec = affd->pre_vectors;
> >  		}
> 
> When the above for loop is exited, 'done' will always be equal to 'nodes'
> since there are no early exits from the loop.  Hence there's no need to be
> incrementing 'done' in the loop.
> 
> > +		if (done > numvecs)
> > +			done = numvecs;
> 
> And if 'done' would always be equal to 'nodes', there is no need for the test.
> Just always set 'done' to 'numvecs'.

Thanks. I will fix this in v2.

> 
> >  		goto out;
> >  	}
> >
> > --
> > 2.14.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ