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]
Message-ID: <20191203100010.GI2827@hirez.programming.kicks-ass.net>
Date:   Tue, 3 Dec 2019 11:00:10 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Paul E. McKenney" <paulmck@...nel.org>
Cc:     Tejun Heo <tj@...nel.org>, jiangshanlai@...il.com,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Workqueues splat due to ending up on wrong CPU

On Mon, Dec 02, 2019 at 03:39:44PM -0800, Paul E. McKenney wrote:

> I think that I do not understand the code, but I never let that stop
> me from asking stupid questions!  ;-)
> 
> Suppose that a given worker is bound to a particular CPU, but has no
> work pending, and is therefore sleeping in the schedule() call near the
> end of worker_thread().  During this time, its CPU goes offline and then
> comes back online.  Doesn't this break that task's affinity to that CPU?

No. The thing about sleeping tasks is that they're not in fact on any
CPU at all. Only when a task wakes up do we concern ourselves with
placing it. If at that time we find the CPU it was constrained to is no
longer with us, then we go break affinity.

But if the CPU went away and came back while the task was asleep, it
will not notice anything.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ