Re: [RFC PATCH v3 3/5] sched: nominate preferred wakeup cpu

From: Vaidyanathan Srinivasan
Date: Tue Nov 11 2008 - 12:24:26 EST


* Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> [2008-11-11 22:19:46]:

> Vaidyanathan Srinivasan wrote:
> > * Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> [2008-11-11 14:43:39]:
> >
> >> 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?
> >
> > Yep, that will be a good idea. We can get to root_domain from each
> > CPU's rq and we can get rid of the per-cpu pointers for
> > preferred_wakeup_cpu as well. I will change the implementation and
> > re-post.
>
> Did you see Vatsa's comments? root_domain will no work if you have more than one
> preferred_wakeup_cpu per domain.

Hi Balbir,

I just saw Vatsa's comments. We have similar limitation with the
current implementation also. sched_domain_attr dattr is also per
partitioned domain and not per numa node.

In the current implementation we can get rid of the per-cpu variables
and use root_domain. Later we can have an array in root_domain and
index it based on the cpu's node.

Thanks,
Vaidy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/