lkml.org 
[lkml]   [2017]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kthread: Fix race condition between kthread_parkme() and kthread_unpark()
On Thu, 28 Sep 2017, Junaid Shahid wrote:

> Hi Peter,
>
> It looks like try_cmpxchg is not available on non-x86 archs, but other than
> that the version that you proposed looks good.
>
> One thing that I am a bit curious about is that the original code, before
> either patch, had a test_and_set_bit for KTHREAD_IS_PARKED rather than just
> a set_bit. I can't think of any reason why that was needed, since it
> doesn't look like TASK_PARKED tasks are susceptible to spurious wakeups. Do
> you by any chance happen to know if there was any specific reason for it?

Everything is susceptible to spurious wakeups and has to deal with it.

Thanks,

tglx

\
 
 \ /
  Last update: 2017-09-29 10:00    [W:0.116 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site