[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xhsmhcz3hk51s.mognet@vschneid.remote.csb>
Date: Wed, 03 May 2023 12:50:07 +0100
From: Valentin Schneider <vschneid@...hat.com>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
Christoph Lameter <cl@...ux.com>,
Dave Chinner <dchinner@...hat.com>,
Yury Norov <yury.norov@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Ye Bin <yebin10@...wei.com>, linux-mm@...ck.org
Subject: Re: [patch 0/3] lib/percpu_counter, cpu/hotplug: Cure the
cpu_dying_mask woes
On 14/04/23 18:30, Thomas Gleixner wrote:
> Hi!
>
> The cpu_dying_mask is not only undocumented but also to some extent a
> misnomer. It's purpose is to capture the last direction of a cpu_up() or
> cpu_down() operation taking eventual rollback operations into account.
>
> cpu_dying mask is not really useful for general consumption. The
> cpu_dying_mask bits are sticky even after cpu_up() or cpu_down() completes.
>
> A recent fix to plug a race in the per CPU counter code picked
> cpu_dying_mask to cure it. Unfortunately this does not work as the author
> probably expected and the behaviour of cpu_dying_mask is not easy to change
> without breaking the only other and initial user, the scheduler.
>
> This series addresses this by:
>
> 1) Reworking the per CPU counter hotplug mechanism so the race is fully
> plugged without using cpu_dying_mask
>
> 2) Replacing the cpu_dying_mask logic with hotplug core internal state
> which is exposed to the scheduler with a properly documented
> function.
>
For patches 2-3:
Reviewed-by: Valentin Schneider <vschneid@...hat.com>
Powered by blists - more mailing lists