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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

