lkml.org 
[lkml]   [2011]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: next buddy hint on sleep and preempt path
From
Date
On Tue, 2011-03-01 at 15:33 -0800, Venkatesh Pallipadi wrote:
> When a task in a taskgroup sleeps, pick_next_task starts all the way back at
> the root and picks the task/taskgroup with the min vruntime across all
> runnable tasks. But, when there are many frequently sleeping tasks
> across different taskgroups, it makes better sense to stay with same taskgroup
> for its slice period (or until all tasks in the taskgroup sleeps) instead of
> switching cross taskgroup on each sleep after a short runtime.
> This helps specifically where taskgroups corresponds to a process with
> multiple threads. The change reduces the number of CR3 switches in this case.

I wasn't expecting this approach to this problem, and was dreading a
pick_next_task() rewrite, but aside from all the mentioned problems it
does look quite nice :-)

It doesn't avoid iterating the whole hierarchy every schedule, but like
you say, it should avoid the expensive cr3 switches.



\
 
 \ /
  Last update: 2011-03-02 11:33    [W:0.143 / U:0.096 seconds]
©2003-2014 Jasper Spaans. Advertise on this site