mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: "Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Neeraj Upadhyay <quic_neeraju@quicinc.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale
Date: Thu, 16 Mar 2023 10:50:53 -0700	[thread overview]
Message-ID: <2bbaa13a-bfcc-45b7-acce-8da59a2a0c32@paulmck-laptop> (raw)
In-Reply-To: <CAEXW_YTh18nWTWjLBCRiB2AAH76oD7XrMMMPWZ+9thFSmcPaVg@mail.gmail.com>

On Thu, Mar 16, 2023 at 10:57:06AM -0400, Joel Fernandes wrote:
> On Thu, Mar 16, 2023 at 9:53 AM Zhuo, Qiuxu <qiuxu.zhuo@intel.com> wrote:
> >
> [...]
> > > >> From: Paul E. McKenney <paulmck@kernel.org> [...]
> > > >>>>
> > > >>>> How about to pull the rcu_scale_cleanup() function after
> > > >> kfree_scale_cleanup().
> > > >>>> This groups kfree_* functions and groups rcu_scale_* functions.
> > > >>>> Then the code would look cleaner.
> > > >>>> So, do you think the changes below are better?
> > > >>>
> > > >>> IMHO, I don't think doing such a code move is better. Just add a new
> > > >>> header file and declare the function there. But see what Paul says
> > > >>> first.
> > > >>
> > > >> This situation is likely to be an early hint that the kvfree_rcu()
> > > >> testing should be split out from kernel/rcu/rcuscale.c.
> > > >
> > > > Another is that it's a bit expensive to create a new header file just
> > > > for eliminating a function declaration. ;-)
> > >
> > > What is so expensive about new files? It is a natural organization structure.
> > >
> > > > So, if no objections, I'd like to send out the v2 patch with the updates below:
> > > >
> > > >   - Move rcu_scale_cleanup() after kfree_scale_cleanup() to eliminate the
> > > >     declaration of kfree_scale_cleanup(). Though this makes the patch bigger,
> > > >     get the file rcuscale.c much cleaner.
> > > >
> > > >   - Remove the unnecessary step "modprobe torture" from the commit
> > > message.
> > > >
> > > >   - Add the description for why move rcu_scale_cleanup() after
> > > >     kfree_scale_cleanup() to the commit message.
> > >
> > > Honestly if you are moving so many lines around, you may as well split it out
> > > into a new module.
> > > The kfree stuff being clubbed in the same file has also been a major
> > > annoyance.
> >
> > I'm OK with creating a new kernel module for these kfree stuffs,
> > but do we really need to do that?

It is not a particularly high priority.

> If it were me doing this, I would try to split it just because in the
> long term I may have to maintain or deal with it.
> 
> I was also thinking a new scale directory _may_ make sense for
> performance tests.
> 
> kernel/rcu/scaletests/kfree.c
> kernel/rcu/scaletests/core.c
> kernel/rcu/scaletests/ref.c
> 
> Or something like that.

I don't believe we are there yet, but...

> and then maybe putt common code into: kernel/rcu/scaletests/common.c

...splitting out the common code within the current directory/file
structure makes a lot of sense to me.  Not that I have checked up on
exactly how much common code there really is.  ;-)

							Thanx, Paul

>  - Joel
> 
> >
> > @paulmck, what's your suggestion for the next step?
> >
> > >  - Joel
> > >
> > >
> > > > Thanks!
> > > > -Qiuxu
> > > >
> > > >> [...]

  reply	other threads:[~2023-03-16 17:51 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13  8:04 Qiuxu Zhuo
2023-03-14 23:02 ` Paul E. McKenney
2023-03-14 23:29   ` Joel Fernandes
2023-03-15 14:17     ` Zhuo, Qiuxu
2023-03-15 14:07   ` Zhuo, Qiuxu
2023-03-15 14:12     ` Joel Fernandes
2023-03-15 16:59       ` Paul E. McKenney
2023-03-16 13:17         ` Zhuo, Qiuxu
2023-03-16 13:28           ` Joel Fernandes
2023-03-16 13:53             ` Zhuo, Qiuxu
2023-03-16 14:57               ` Joel Fernandes
2023-03-16 17:50                 ` Paul E. McKenney [this message]
2023-03-17  5:50                   ` [PATCH v2 " Qiuxu Zhuo
2023-03-20 20:41                     ` Paul E. McKenney
2023-03-21  1:21                       ` Zhuo, Qiuxu
2023-03-21  4:26                         ` Paul E. McKenney
2023-03-21  5:23                           ` [PATCH v3 1/2] rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup() Qiuxu Zhuo
2023-03-21  5:23                             ` [PATCH v3 2/2] rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale Qiuxu Zhuo
2023-03-21 15:47                               ` Davidlohr Bueso
2023-03-21 19:23                                 ` Paul E. McKenney
2023-03-21 21:28                                   ` Joel Fernandes
2023-03-22  1:26                                   ` Zhuo, Qiuxu
2023-03-22  2:18                                     ` Joel Fernandes
2023-03-22 11:42                                   ` [PATCH v4 0/2] " Qiuxu Zhuo
2023-03-22 11:42                                     ` [PATCH v4 1/2] rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup() Qiuxu Zhuo
2023-03-22 11:42                                     ` [PATCH v4 2/2] rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale Qiuxu Zhuo
2023-03-22 18:24                                       ` Paul E. McKenney
2023-03-17  3:29                 ` [PATCH 1/1] " Zhuo, Qiuxu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2bbaa13a-bfcc-45b7-acce-8da59a2a0c32@paulmck-laptop \
    --to=paulmck@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=qiuxu.zhuo@intel.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®