@@ -151,7 +151,7 @@ static void __init cpupool_gran_init(void)
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)
@@ -289,6 +289,7 @@ static struct cpupool *cpupool_create(
}
c->sched->cpupool = c;
c->gran = opt_sched_granularity;
+ c->sched_gran = sched_granularity;
*q = c;
@@ -514,6 +514,7 @@ struct cpupool
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)