[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87a6r0uvhi.fsf@oracle.com>
Date: Thu, 18 Mar 2021 15:12:25 -0400
From: Daniel Jordan <daniel.m.jordan@...cle.com>
To: Alexey Klimov <aklimov@...hat.com>
Cc: linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>, yury.norov@...il.com,
tglx@...utronix.de, Joshua Baker <jobaker@...hat.com>,
audralmitchel@...il.com, arnd@...db.de, gregkh@...uxfoundation.org,
rafael@...nel.org, tj@...nel.org,
Qais Yousef <qais.yousef@....com>, hannes@...xchg.org,
Alexey Klimov <klimov.linux@...il.com>
Subject: Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish
on cpu onlining
Alexey Klimov <aklimov@...hat.com> writes:
> The first section of comment seems problematic to me with regards to such move:
>
> * As this needs to hold the cpu maps lock it's impossible
> * to call device_offline() because that ends up calling
> * cpu_down() which takes cpu maps lock. cpu maps lock
> * needs to be held as this might race against in kernel
> * abusers of the hotplug machinery (thermal management).
>
> Cpu maps lock is released in cpu_maps_update_done() hence we will move
> dev->offline out of cpu maps lock. Maybe I misunderstood the comment
> and it relates to calling cpu_down_maps_locked() under lock to avoid
> race?
Yes, that's what I take from the comment, the cpu maps lock protects
against racing hotplug operations.
Powered by blists - more mailing lists