[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAEVge3W3bL+GNtx@x1n>
Date: Thu, 2 Mar 2023 16:30:41 -0500
From: Peter Xu <peterx@...hat.com>
To: Marcelo Tosatti <mtosatti@...hat.com>
Cc: Christoph Lameter <cl@...ux.com>,
Aaron Tomlin <atomlin@...mlin.com>,
Frederic Weisbecker <frederic@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v2 10/11] mm/vmstat: switch vmstat shepherd to flush
per-CPU counters remotely
On Thu, Mar 02, 2023 at 06:16:42PM -0300, Marcelo Tosatti wrote:
> On Thu, Mar 02, 2023 at 04:01:07PM -0500, Peter Xu wrote:
> > On Thu, Feb 09, 2023 at 12:02:00PM -0300, Marcelo Tosatti wrote:
> > > +#ifdef CONFIG_HAVE_CMPXCHG_LOCAL
> > > +/* Flush counters remotely if CPU uses cmpxchg to update its per-CPU counters */
> > > +static void vmstat_shepherd(struct work_struct *w)
> > > +{
> > > + int cpu;
> > > +
> > > + cpus_read_lock();
> > > + for_each_online_cpu(cpu) {
> > > + cpu_vm_stats_fold(cpu);
> >
> > Nitpick: IIUC this line is the only change with CONFIG_HAVE_CMPXCHG_LOCAL
> > to replace the queuing. Would it be cleaner to move the ifdef into
> > vmstat_shepherd, then, and keep the common logic?
>
> https://lore.kernel.org/lkml/20221223144150.GA79369@lothringen/
:-)
[...]
> So it seems the current separation is quite readable
> (unless you have a suggestion).
No, feel free to ignore any of my nitpicks when you don't think proper. :)
Keeping it is fine to me.
--
Peter Xu
Powered by blists - more mailing lists