mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Alexey Klimov <aklimov@redhat.com>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	yury.norov@gmail.com, tglx@linutronix.de,
	Joshua Baker <jobaker@redhat.com>,
	audralmitchel@gmail.com, arnd@arndb.de,
	gregkh@linuxfoundation.org, rafael@kernel.org, tj@kernel.org,
	Qais Yousef <qais.yousef@arm.com>,
	hannes@cmpxchg.org, Alexey Klimov <klimov.linux@gmail.com>
Subject: Re: [PATCH v2] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining
Date: Thu, 18 Mar 2021 15:12:25 -0400	[thread overview]
Message-ID: <87a6r0uvhi.fsf@oracle.com> (raw)
In-Reply-To: <CAFBcO+99Ax5MuOtzNx=NrmnUN=+913Sc-DV83ObOi01A=kkN3w@mail.gmail.com>

Alexey Klimov <aklimov@redhat.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.

  reply	other threads:[~2021-03-18 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  0:30 Alexey Klimov
2021-02-12 19:41 ` Daniel Jordan
2021-03-16  3:15   ` Alexey Klimov
2021-03-18 19:12     ` Daniel Jordan [this message]
2021-02-16 18:29 ` Qais Yousef

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=87a6r0uvhi.fsf@oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=aklimov@redhat.com \
    --cc=arnd@arndb.de \
    --cc=audralmitchel@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jobaker@redhat.com \
    --cc=klimov.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=yury.norov@gmail.com \
    /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

Powered by JetHome