Even with storing the scheduling granularity in struct cpupool there
are still a few bits missing for being able to have cpupools with
different granularity (apart from the missing interface for setting
the individual granularities): the number of cpus in a scheduling
unit is always taken from the global sched_granularity variable.
So store the value in struct cpupool and use that instead of
sched_granularity.
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
unsigned int cpupool_get_granularity(const struct cpupool *c)
{
- return c ? sched_granularity : 1;
+ return c ? c->sched_gran : 1;
}
static void free_cpupool_struct(struct cpupool *c)
}
c->sched->cpupool = c;
c->gran = opt_sched_granularity;
+ c->sched_gran = sched_granularity;
*q = c;
struct scheduler *sched;
atomic_t refcnt;
enum sched_gran gran;
+ unsigned int sched_gran; /* Number of cpus per sched-item. */
};
static inline cpumask_t *cpupool_domain_master_cpumask(const struct domain *d)