lkml.org 
[lkml]   [2008]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] wait_task_inactive: don't use the dummy version when !SMP && PREEMPT
On 07/30, Linus Torvalds wrote:
>
> On Wed, 30 Jul 2008, Oleg Nesterov wrote:
> >
> > The patch looks monstrous because it moves the (unchanged) definition
> > of wait_task_inactive() outside of "#ifdef CONFIG_SMP", but it is quite
> > trivial.
>
> Hmm. Doesn't this just deadlock in UP (PREEMPT) if wait_task_interactive()
> is ever called from a no-preempt context?

Given that it calls schedule_timeout_uninterruptible(), it can't be used
from the no-preempt context,

> And if that's never the case, the comment should be updated to reflect
> that (right now it says that it's only invalid to call it with interrupts
> disabled to avoid cross-IPI deadlocks).

Yes, I think this function is might_sleep(),

> Oh, and shouldn't it do a "yield()" instead of a cpu_relax() on UP?

I _think_ that rq->curr must be == current without CONFIG_SMP, but

> and I want to understand why it's
> ok (_if_ it's ok).

me too.

Hopefully Ingo can ack/nack.

Oleg.



\
 
 \ /
  Last update: 2008-07-30 20:13    [W:0.045 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site