From: Daniel Jordan <daniel.m.jordan-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Alexey Klimov <aklimov-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
yury.norov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
Joshua Baker <jobaker-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
audralmitchel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
qais.yousef-5wv7dgnIgG8@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
Alexey Klimov
<klimov.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining
Date: Thu, 04 Feb 2021 19:39:42 -0500 [thread overview]
Message-ID: <87eehvz6sx.fsf@oracle.com> (raw)
In-Reply-To: <YBv5qDBdb/VAq0Vw-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> writes:
> On Thu, Feb 04, 2021 at 12:50:34PM +0000, Alexey Klimov wrote:
>> On Thu, Feb 4, 2021 at 9:46 AM Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
>> >
>> > On Thu, Feb 04, 2021 at 01:01:57AM +0000, Alexey Klimov wrote:
>> > > @@ -1281,6 +1282,11 @@ static int cpu_up(unsigned int cpu, enum cpuhp_state target)
>> > > err = _cpu_up(cpu, 0, target);
>> > > out:
>> > > cpu_maps_update_done();
>> > > +
>> > > + /* To avoid out of line uevent */
>> > > + if (!err)
>> > > + cpuset_wait_for_hotplug();
>> > > +
>> > > return err;
>> > > }
>> > >
>> >
>> > > @@ -2071,14 +2075,18 @@ static void cpuhp_online_cpu_device(unsigned int cpu)
>> > > struct device *dev = get_cpu_device(cpu);
>> > >
>> > > dev->offline = false;
>> > > - /* Tell user space about the state change */
>> > > - kobject_uevent(&dev->kobj, KOBJ_ONLINE);
>> > > }
>> > >
>> >
>> > One concequence of this is that you'll now get a bunch of notifications
>> > across things like suspend/hybernate.
>>
>> The patch doesn't change the number of kobject_uevent()s. The
>> userspace will get the same number of uevents as before the patch (at
>> least if I can rely on my eyes).
>
> bringup_hibernate_cpu() didn't used to generate an event, it does now.
> Same for bringup_nonboot_cpus().
Both of those call cpu_up(), which only gets a cpuset_wait_for_hotplug()
in this patch. No new events generated from that, right, it's just a
wrapper for a flush_work()?
> Also, looking again, you don't seem to be reinstating the OFFLINE event
> you took out.
It seems to be reinstated in cpuhp_smt_disable()?
next prev parent reply other threads:[~2021-02-05 0:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 1:01 [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on cpu onlining Alexey Klimov
[not found] ` <20210204010157.1823669-1-aklimov-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2021-02-04 9:46 ` Peter Zijlstra
[not found] ` <YBvCYhdPai+pb8u2-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2021-02-04 12:50 ` Alexey Klimov
[not found] ` <CAFBcO+_Z1LKqPPwEKq-XGX+RnWQa+vFBVJ9D9y0MNHGUkM_4Jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-02-04 13:42 ` Peter Zijlstra
[not found] ` <YBv5qDBdb/VAq0Vw-Nxj+rRp3nVydTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2021-02-05 0:39 ` Daniel Jordan [this message]
[not found] ` <87eehvz6sx.fsf-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2021-02-11 14:09 ` Alexey Klimov
2021-02-05 11:22 ` Qais Yousef
2021-02-11 13:38 ` Alexey Klimov
2021-02-05 1:35 ` Daniel Jordan
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=87eehvz6sx.fsf@oracle.com \
--to=daniel.m.jordan-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=aklimov-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=audralmitchel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=jobaker-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=klimov.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=qais.yousef-5wv7dgnIgG8@public.gmane.org \
--cc=rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=yury.norov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).