lkml.org 
[lkml]   [2019]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] dump_stack: Avoid the livelock of the dump_lock
On Tue, Oct 29, 2019 at 3:09 PM Kevin Hao <haokexin@gmail.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

\
 
 \ /
  Last update: 2019-10-29 16:25    [W:0.033 / U:24.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site