lkml.org 
[lkml]   [2007]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git] CFS-devel, latest code

* Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:

> humm... I think, it'd be safer to have something like the following
> change in place.
>
> The thing is that __pick_next_entity() must never be called when
> first_fair(cfs_rq) == NULL. It wouldn't be a problem, should
> 'run_node' be the very first field of 'struct sched_entity' (and it's
> the second).
>
> The 'nr_running != 0' check is _not_ enough, due to the fact that
> 'current' is not within the tree. Generic paths are ok (e.g.
> schedule() as put_prev_task() is called previously)... I'm more
> worried about e.g. migration_call() -> CPU_DEAD_FROZEN ->
> migrate_dead_tasks()... if 'current' == rq->idle, no problems.. if
> it's one of the SCHED_NORMAL tasks (or imagine, some other use-cases
> in the future -- i.e. we should not make outer world dependent on
> internal details of sched_fair class) -- it may be "Houston, we've got
> a problem" case.
>
> it's +16 bytes to the ".text". Another variant is to make 'run_node'
> the first data member of 'struct sched_entity' but an additional check
> (se ! = NULL) is still needed in pick_next_entity().

looks good to me - and we already have something similar in sched_rt.c.
I've added your patch to the queue. (Can i add your SoB line too?)

Ingo
-
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-09-27 09:59    [W:0.143 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site