From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbcLJAqJ (ORCPT ); Fri, 9 Dec 2016 19:46:09 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36528 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752145AbcLJAqH (ORCPT ); Fri, 9 Dec 2016 19:46:07 -0500 Date: Sat, 10 Dec 2016 08:45:38 +0800 From: Boqun Feng To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan Subject: Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend Message-ID: <20161210004538.GA9728@tardis.cn.ibm.com> References: <20161209084828.11827-1-boqun.feng@gmail.com> <20161209234945.GM3924@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <20161209234945.GM3924@linux.vnet.ibm.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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, > >=20 > > While reading the discussion at: > >=20 > > https://marc.info/?l=3Dlinux-kernel&m=3D148044253400769 >=20 > This discussion was for stalls specifically, rather than for routine > scans of the bitmasks. >=20 > But it does look to save some code, so worth looking into. >=20 > > 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 w= hether > > 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 correspo= nding > > 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. > >=20 > > So I made this RFC, I did a simple build/boot/rcutorture test on my box= with > > SMP=3D4, nothing bad happens. Currently I'm waiting for the 0day and tr= ying to > > test this one a bigger system, in the meanwhile, looking forwards to any > > comment and suggestion. > >=20 > > So thoughts? >=20 > 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. ;-) >=20 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 ;-) Will modify that in next version. Regards, Boqun > Thanx, Paul >=20 --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAABCAAGBQJYS1AtAAoJEEl56MO1B/q4uSEH/iL2ZBYmi8AQirbn/KmbzQha 71y6/fRPPYr5Uvprz0/R1cyFxqTu7NoEATiSzU23210wxsmRrceDpU/SaYtePu1H F9pjKGUt/cIJagY73F6vf1sThBJ2cHdqeJ05Nl17ES0tm6U1gsdN2MpjtgEE67l/ vvBXfAb9vN4u6aDb0VE0hB8V7ar8ECESK45zze2X7rPXUKhZ06KbOBcwqNiyGxC4 Nd4NUuWfTIO6fb2pgZKZXo9REGEddSgT7bURuqNjc5jgXU50M1/QJGm6T1/o/pGf jnr1HH2WELPEf+jwfGlJfcQ6XVfQef25MZ2ngk6wgNpWcmgof4AW8EuDkHw9ZVg= =a2GZ -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--