lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 04 Feb 2021 19:39:42 -0500
From:   Daniel Jordan <daniel.m.jordan@...cle.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Alexey Klimov <aklimov@...hat.com>
Cc:     linux-kernel@...r.kernel.org, cgroups@...r.kernel.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, lizefan@...wei.com, qais.yousef@....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

Peter Zijlstra <peterz@...radead.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@...radead.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()?

Powered by blists - more mailing lists