[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALvZod7XREiFFgqb8KAMOzpPjozsu90p9Oz+tAVuBPGVs4=mvA@mail.gmail.com>
Date: Tue, 8 Nov 2022 17:29:31 -0800
From: Shakeel Butt <shakeelb@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v2] percpu_counter: add percpu_counter_sum_all interface
On Tue, Nov 8, 2022 at 5:26 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Wed, 9 Nov 2022 01:20:11 +0000 Shakeel Butt <shakeelb@...gle.com> wrote:
>
> > However there is a small race window between the online CPUs traversal
> > of percpu_counter_sum and the CPU offline callback. The offline callback
> > has to traverse all the percpu_counters on the system to flush the CPU
> > local data which can be a lot. During that time, the CPU which is going
> > offline has already been published as offline to all the readers. So, as
> > the offline callback is running, percpu_counter_sum can be called for
> > one counter which has some state on the CPU going offline. Since
> > percpu_counter_sum only traverses online CPUs, it will skip that
> > specific CPU and the offline callback might not have flushed the state
> > for that specific percpu_counter on that offlined CPU.
>
> LGTM.
>
> What are the user-visible effects of this bug? Should we cc:stable? If
> so, can you identify a suitable Fixes:?
>
The patch which exposed this is still in mm-unstable (converting rss
stats in mm_struct into percpu_counter) and other percpu_counter users
don't really need this new interface. So, there is no need for a
cc:stable.
thanks,
Shakeel
Powered by blists - more mailing lists