lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH v5 01/14] sched: add a new arch_sd_local_flags for sched_domain init
On Thu, Nov 14, 2013 at 10:49:02AM +0000, Morten Rasmussen wrote:
> We need a way to know which group of cpus the flag applies to. If we
> don't want to pass a pointer to the sched_domain and we want to replace
> the current named sched_domain levels with something more flexible, the
> only solution I can think of right now is to pass a cpumask to the arch
> code. Better suggestions?

That might work.

> If we let arch generate the topology it could set the flags as well. But
> that means that an arch would have to deal with generating the topology
> even if it just needs to flip a single flag in the default topology.
>
> Another thing is if we want to put energy related information into the
> sched_domain hierarchy. If we want various energy costs (P and C state)
> to be represented here we would need to modify more than just flags.
>
> One way to do that is to put the energy information into a sub-struct and
> have another arch_sd_energy() call that allows the arch to populate that
> struct with relevant information.

Right.. I didn't think that far ahead yet :-)

So one thing that could be done is something like:

struct sd_energy arch_sd_energy(const struct sched_domain * sd);

Where you have an entire sd available, but since its const you cannot
actually modify it and are restricted to the return value -- which we
can validate before applying.

And we can have one such a function per specific thing we want to allow
modifying.


\
 
 \ /
  Last update: 2013-11-14 13:21    [W:0.156 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site