lkml.org 
[lkml]   [2007]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] Enhance process freezer interface for usage beyond software suspend
On 04/05, Gautham R Shenoy wrote:
>
> On Thu, Apr 05, 2007 at 01:46:33PM +0400, Oleg Nesterov wrote:
> >
> > > --- linux-2.6.21-rc5.orig/kernel/sched.c
> > > +++ linux-2.6.21-rc5/kernel/sched.c
> > > @@ -5057,6 +5057,7 @@ static int migration_thread(void *data)
> > > BUG_ON(rq->migration_thread != current);
> > >
> > > set_current_state(TASK_INTERRUPTIBLE);
> > > + freezer_exempt(FE_ALL);
> >
> > This is a real nitpick, but it was hard to me to understand this change.
> > Because it looks as if we have a subtle reason to set TASK_INTERRUPTIBLE
> > before freezer_exempt(). Unless I missed something, I'd suggest to move
> > freezer_exempt() up, before set_current_state().
> >
> > The same for apm_mainloop().
>
> Ok, no subtle reasons for freezer_exempt()ing after set_current_state().
> So no problems changing the order. But (just curious), is there any specific
> problem with this particular order ?

No, no, it was just a nitpick :) May be this is just me, but when I see the
code like

set_current_state(TASK_XXX);
something_which_doesnt_need_TASK_XXX();

, I can't read the code further, trying to understand where I was wrong
and why do we need to change task->state here.

Oleg.

-
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: 2007-04-05 13:33    [W:0.096 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site