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: <20161210042805.GN3924@linux.vnet.ibm.com>
Date:   Fri, 9 Dec 2016 20:28:05 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Boqun Feng <boqun.feng@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>
Subject: Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu()
 and its friend

On Sat, Dec 10, 2016 at 08:45:38AM +0800, Boqun Feng wrote:
> On Fri, Dec 09, 2016 at 03:49:45PM -0800, Paul E. McKenney wrote:
> > On Fri, Dec 09, 2016 at 04:48:22PM +0800, Boqun Feng wrote:
> > > Hi Paul,
> > > 
> > > While reading the discussion at:
> > > 
> > > https://marc.info/?l=linux-kernel&m=148044253400769
> > 
> > This discussion was for stalls specifically, rather than for routine
> > scans of the bitmasks.
> > 
> > But it does look to save some code, so worth looking into.
> > 
> > > I figured we might use this fact to save some extra checks in RCU core code,
> > > currently we iterate over all the possible CPUs on a leaf node, check whether
> > > they were masked in a certain mask and do something. However, given the fact
> > > that the masks on a leaf node should always be sparse than the corresponding
> > > part of cpu_possible_mask, we'd better iterate over all bits in a mask and
> > > check whether the corresponding CPU is possible or not.
> > > 
> > > So I made this RFC, I did a simple build/boot/rcutorture test on my box with
> > > SMP=4, nothing bad happens. Currently I'm waiting for the 0day and trying to
> > > test this one a bigger system, in the meanwhile, looking forwards to any
> > > comment and suggestion.
> > > 
> > > So thoughts?
> > 
> > By analogy with for_each_cpu() and for_each_possible_cpu(), the name
> > should instead be for_each_leaf_node_cpu(), the tradition of excessively
> > long names in RCU notwithstanding.  ;-)
> > 
> 
> Make sense ;-)
> 
> I think it's more appropriate to call it for_each_leaf_node_mask_cpu(),
> because we don't iterate all cpus of a leaf node. The word "possible"
> could be dropped because obviously we won't iterate over "impossible"
> cpus in a leaf node ;-)

C'mon, Boqun!  The for_each_leaf_node_cpu() is not only consistent
with the for_each_cpu() family, it is shorter!  ;-)

							Thanx, Paul

> Will modify that in next version.
> 
> Regards,
> Boqun
> 
> > 							Thanx, Paul
> > 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ