lkml.org 
[lkml]   [2009]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 04/21] sched: implement scheduler notifiers
From
Date
On Tue, 2009-11-17 at 03:54 +0900, Tejun Heo wrote:
> Peter Zijlstra wrote:
> > I really hate exposing activate/deactivate.
> >
> > You say:
> >
> >> Activated and deactivated are called
> >> when a task's readiness to run changes.
> >
> > How is that not clear from the out hook? It would seem to me that when
> > you get scheduled out with a p->state != TASK_RUNNING you're not ready.
>
> In that in OUT hook the next task to switch to is already determined
> and it wouldn't be symmetric with activate (but I suppose we can match
> the symmetry from activate side). If deactivate/activate/in/out
> events are too low level,

Not too low, just wrong. Most functions operating on the scheduler state
like sys_renice(), sys_sched_setscheduler() etc.. all do a
deactivate/activate series, even though the task at hand never goes
through a sleep or blocking state.

> we can have sleep/ready/run hooks instead.

I would much prefer that, sleep/ready are significantly different from
deactivate/activate.



\
 
 \ /
  Last update: 2009-11-16 21:33    [W:1.766 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site