lkml.org 
[lkml]   [2008]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v3 3/5] sched: nominate preferred wakeup cpu
Peter Zijlstra wrote:
> On Tue, 2008-11-11 at 00:03 +0530, Vaidyanathan Srinivasan wrote:
>
>> When the system utilisation is low and more cpus are idle,
>> then the process waking up from sleep should prefer to
>> wakeup an idle cpu from semi-idle cpu package (multi core
>> package) rather than a completely idle cpu package which
>> would waste power.
>>
>> Use the sched_mc balance logic in find_busiest_group() to
>> nominate a preferred wakeup cpu.
>>
>> This info can be sored in appropriate sched_domain, but
>> updating this info in all copies of sched_domain is not
>> practical. For now lets try with a per-cpu variable
>> pointing to a common storage in partition sched domain
>> attribute. Global variable may not work in partitioned
>> sched domain case.
>>
>
> Would it make sense to place the preferred_wakeup_cpu stuff in the
> root_domain structure we already have?
>

From the description, this is exactly what the root-domains were created
to solve.

Vaidyanathan, just declare your object in "struct root_domain" and
initialize it in init_rootdomain() in kernel/sched.c, and then access it
via rq->rd to take advantage of this infrastructure. It will
automatically follow any partitioning that happens to be configured.

-Greg


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-11-11 15:07    [W:0.221 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site