Re: [PATCH 2/5] cpumask: make task_struct.cpus_allowed a cpumask_var_t

From: Rusty Russell
Date: Mon Jun 28 2010 - 05:31:49 EST


On Sat, 26 Jun 2010 01:30:25 am Christoph Lameter wrote:
> On Fri, 25 Jun 2010, Rusty Russell wrote:
>
> > Even better would be to point to the fixed "one cpu" and "all cpus"
> > masks where possible, and make a copy when setting it to something
> > else. But you'd have to track down those naughty places which frob it
> > directly...
>
> Put it into a read only segment?

Well, I was thinking of an audit as the first step :)

> What is the estimated performance impact of adding a level of indirection
> (and a potential cache miss) to a number of critical code paths?

Unknown. Originally, I moved the mask to the end of the struct (so we could
under-allocate for the CPUMASK_OFFSTACK nr_cpu_ids < NR_CPUS case), but Ingo
didn't want to change the struct for the non-CPUMASK_OFFSTACK case.

Measurements welcome...
Rusty.
--
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/