[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YYD8qi/GsTrTlPMh@hirez.programming.kicks-ass.net>
Date: Tue, 2 Nov 2021 09:54:02 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [GIT pull] sched/core for v5.16-rc1
On Mon, Nov 01, 2021 at 02:01:13PM -0700, Linus Torvalds wrote:
> On Sun, Oct 31, 2021 at 6:16 PM Thomas Gleixner <tglx@...utronix.de> wrote:
> >
> > - Make wchan() more robust and work with all kind of unwinders by
> > enforcing that the task stays blocked while unwinding is in progress.
>
> Ugh. This not-very-important data is protected by a rather core lock.
>
> Is this yet another example of "unwinding is so fragile that it can
> screw up unless we take a lock that is seriously overkill for a not
> very important operation"?
>
> Unwinders that need locks because they can do bad things if they are
> working on unstable data are EVIL and WRONG.
Because of that :/ The eventual plan was to implement wchan in core code
using the 'regular' stack unwinding functions we have, the diffstats are
nice, but the unwinders not so. Also see my other reply.
https://lkml.kernel.org/r/20211022152104.487919043@infradead.org
> I guess I don't care too much about the pi_lock, and the actual
> unwinding is hopefully done on tasks that don't care about it, but
> this smells suspicious to me.
You do in fact care about pi_lock. The name is very wrong these days
(and I've been very tardy with renaming it because I can't seem to come
up with a good name).
It is in fact the core lock involved with regular wakeups. The lock was
initially PI only, but it got co-opted into common scheduler use a fair
number of years ago. These days it serializes pretty much all per-task
scheduling state, not only the pi-chain. So perhaps I should do:
s/pi_lock/sched_lock/ ?
Powered by blists - more mailing lists