lkml.org 
[lkml]   [2004]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: keventd_create_kthread
Ingo Molnar <mingo@redhat.com> wrote:
>
> i'd strongly advise against using wait_task_inactive() in
> keventd_create_kthread() - it's _polling_. We must not do any polling like
> that in any modern interface. Why does keventd_create_kthread() need
> wait_task_inactive()?

The way it's designed, we _have_ to wait until the new kthread has gone to
sleep, because we poke him again with wake_up_process().

However, if that wake_up_process() comes too early we'll just flip the new
thread out of TASK_INTERUPTIBLE into TASK_RUNNING and the schedule() in
kthread() will fall straight through. So perhaps we can simply remove the
wait_task_inactive()?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.052 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site