Re: [git pull] cpus4096 fixes

From: Ingo Molnar
Date: Mon Jul 28 2008 - 04:17:15 EST



* Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:

> Mike: I now think the right long-term answer is Linus' dense cpumap
> idea + a convenience allocator for cpumasks. We sweep the kernel for
> all on-stack vars and replace them with one or the other. Thoughts?

The dense cpumap for constant cpumasks is OK as it's clever, compact and
static.

All-dynamic allocator for on-stack cpumasks ... is a less obvious
choice.

I dont fundamentally oppose it, but doing that we might be throwing the
baby out with the bathwater. In many cases having 0.5K on the kernel
stack is OK. (especially for high-level functions.)

We could do all-dynamic allocations, and it's simpler in many ways (less
ugly dual-use initialization macros), but it's intrusive for the common
case. I kind of liked Mike's approach to push the dynamic overhead to
the less common case - although i dont like all of the end result.
That's been the driving principle behind the existing patches: dont hurt
the common case.

Anyway, Mike's solution gives us the option to go in both directions now
as we've essentially annotated the most difficult on-stack users and
added a dynamic alloc/free path to them and tested it. Making them all
dynamic will be easy as it just gets rid of the small-mask
special-cases.

Ingo
--
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/