Re: [RFC] [PATCH] cpuset: fix wrong calculation of relax domain level

From: Hidetoshi Seto
Date: Thu Jul 17 2008 - 20:27:19 EST


Paul Jackson wrote:
> Question:
>
> In the case that the top_cpuset's sched_load_balance is -not- set,
> is there code already present that sets the sched_relax_domain_level
> in overlapping cpusets to the largest value in any of the overlapping
> cpusets?
>
> If so, where is that code?
>

My humble answer:

static void rebuild_sched_domains(void)
{
:
while (__kfifo_get(q, (void *)&cp, sizeof(cp))) {
// pick up cpusets with sched_load_balance = 1
}
:
restart:
/* Find the best partition (set of sched domains) */
for (i = 0; i < csn; i++) {
// check overlap and set proper partition number
}
:
for (nslot = 0, i = 0; i < csn; i++) {
:
if (apn == b->pn) {
// make map and attr from all cpusets
// having same partition number
cpus_or(*dp, *dp, b->cpus_allowed);
b->pn = -1;
if (dattr)
update_domain_attr(dattr
+ nslot, b);
}
:
}
:
rebuild:
:
done:
:
}

So the codes you searching is near by 'update_domain_attr' above, I guess.

Thanks,
H.Seto
--
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/