lkml.org 
[lkml]   [2006]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: what is the state of current after an mm_fault occurs?
en,
You mean in some pagefault place we do schedule()?
Where?
Thank you !



On 1/5/06, Andrew Morton <akpm@osdl.org> wrote:
> jeff shia <tshxiayu@gmail.com> wrote:
> >
> > In my opinion, the state of current should be TASK_RUNNING
> > after an mm_fault occurs.But I donot know why the function of
> > handle_mm_fault() set the state of current TASK_RUNNING.
>
> It was a long time ago.. 2.4.early, perhaps.
>
> There was a place (maybe in the select() code) where we were doing
> copy_*_user() while in state TASK_INTERRUPTIBLE. And iirc there was a
> place in the pagefault code which did schedule(). So we would occasionally
> hit schedule() in state TASK_INTERRUPTIBLE, when we expected to be in state
> TASK_RUNNING.
>
> So we made handle_mm_fault() set TASK_RUNNING to prevent any further such
> things.
>
>
-
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: 2006-01-05 04:23    [W:0.060 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site