[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBcO+81bFBUuR=MrLttBEs8gKh0hx+EcJA2MCbqMzu=CUoybg@mail.gmail.com>
Date: Thu, 11 Feb 2021 13:38:51 +0000
From: Alexey Klimov <aklimov@...hat.com>
To: Qais Yousef <qais.yousef@....com>
Cc: Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
yury.norov@...il.com, Daniel Jordan <daniel.m.jordan@...cle.com>,
tglx@...utronix.de, Joshua Baker <jobaker@...hat.com>,
audralmitchel@...il.com, arnd@...db.de, gregkh@...uxfoundation.org,
rafael@...nel.org, tj@...nel.org, lizefan@...wei.com,
hannes@...xchg.org, Alexey Klimov <klimov.linux@...il.com>
Subject: Re: [PATCH] cpu/hotplug: wait for cpuset_hotplug_work to finish on
cpu onlining
On Fri, Feb 5, 2021 at 11:22 AM Qais Yousef <qais.yousef@....com> wrote:
>
> On 02/04/21 10:46, Peter Zijlstra 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.
>
> And the resume latency will incur 5-30ms * nr_cpu_ids.
>
> Since you just care about device_online(), isn't cpu_device_up() a better place
> for the wait? This function is special helper for device_online(), leaving
> suspend/resume and kexec paths free from having to do this unnecessary wait.
Yup, the same idea here once Peter mentioned bringup_nonboot_cpus()
and bringup_hibernate_cpu().
Best regards,
Alexey
Powered by blists - more mailing lists