From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751148AbdEBM4z (ORCPT ); Tue, 2 May 2017 08:56:55 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56932 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbdEBM4x (ORCPT ); Tue, 2 May 2017 08:56:53 -0400 Date: Tue, 2 May 2017 05:56:48 -0700 From: "Paul E. McKenney" To: Ingo Molnar Cc: Linus Torvalds , Linux Kernel Mailing List , Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH] srcu: Debloat the header Reply-To: paulmck@linux.vnet.ibm.com References: <20170501095915.rm4zi5z4ta44il5p@gmail.com> <20170502040202.GR3956@linux.vnet.ibm.com> <20170502075910.d7dl762muvuc5uoh@gmail.com> <20170502083117.kesevd5nhw3tsrmz@gmail.com> <20170502102503.GV3956@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170502102503.GV3956@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17050212-2213-0000-0000-000001A92622 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007011; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00855182; UDB=6.00423213; IPR=6.00634343; BA=6.00005322; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015269; XFM=3.00000014; UTC=2017-05-02 12:56:51 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17050212-2214-0000-0000-000055E96C4A Message-Id: <20170502125648.GA1286@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-02_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705020074 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 02, 2017 at 03:25:03AM -0700, Paul E. McKenney wrote: > On Tue, May 02, 2017 at 10:31:18AM +0200, Ingo Molnar wrote: > > > > * Ingo Molnar wrote: > > > > > > I will get rid of the unused rcu_segcblist_extract_all() function and create a > > > > kernel/rcu/segcblist.c for the functions that are either non-trivial or > > > > performance-insensitive. > > > > > > > > Does that cover it, or am I missing something? > > > > > > I'd also suggest moving as much of the RCU internal data types into kernel/rcu/ > > > as possible. It's not clear to me which part of it is supposed to be a public > > > API and which bits are internal. It might make sense to keep it internal for the > > > time being, and only export things once there are users. > > > > > > I.e. a pretty good solution would be to move all of > > > include/linux/rcu_segcblist.h to kernel/rcu/rcu_segcblist.c or so - and do a > > > kernel/rcu/rcu_segcblist.h with the data types and function prototypes. > > > > I.e. the attached patch as a first step. > > > > Only minimally build tested, but it appears to be do the trick. > > > > This changes the header from ~700 lines to only 90 lines - > > 60% of which is comments. > > > > The deinlining of the inline functions within kernel/rcu/ should also be done, as > > a separate patch on top of this. > > > > What do you think? > > Thank you very much! > > I have pulled this in and started a short rcutorture run. I will do > de-inline and create a .c file on top of this and retest after the > rcutorture has finished. And I am applying the following fixlet for !SMP builds, which I am retesting. Other than that, initial rcutorture ran fine! Thanx, Paul ------------------------------------------------------------------------ diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c index b8293527ee18..36e1f82faed1 100644 --- a/kernel/rcu/srcutiny.c +++ b/kernel/rcu/srcutiny.c @@ -30,6 +30,7 @@ #include #include +#include "rcu_segcblist.h" #include "rcu.h" static int init_srcu_struct_fields(struct srcu_struct *sp)