[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHk-=wja287VnDKdftnQUYYe=YqX5Lz-iweA-RkcG3EGS2sD6w@mail.gmail.com>
Date: Tue, 29 Oct 2019 16:23:33 +0100
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Kevin Hao <haokexin@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] dump_stack: Avoid the livelock of the dump_lock
On Tue, Oct 29, 2019 at 3:09 PM Kevin Hao <haokexin@...il.com> wrote:
>
> Do you mean something like this?
Yeah, except I'd make it be something like
local_irq_restore(flags);
- cpu_relax();
+ do { cpu_relax(); } while (atomic_read(&dump_lock) != -1);
goto retry;
instead, ie doing the cpu_relax() inside that loop.
Obviously untested.
Linus
Powered by blists - more mailing lists