Re: [git pull] cpus4096 fixes
From: Linus Torvalds
Date: Sun Jul 27 2008 - 18:21:20 EST
On Sun, 27 Jul 2008, Al Viro wrote:
>
> ITYM "one 32.5kB array" -
> (u64[65][64]){[1][0] = 1, [2][0] = 2, [3][0] = 4, ..., [64][0] = 1ULL<<63}
> would work just fine. You were saying...?
Yeah, you can optimize it even more, I agree. But even the _trivial_ one
gets you to linear memory use (rather than something that is O(n^2) in
number of CPU's) and makes the thing a non-issue. But yes, there's another
almost-factor-of-two that you can get by being clever.
But in fact, I think your optimization would not just use less memory, but
yes, it's also easier to write the initializer for (with just a couple of
levels of macros to avoid having to do 64 entries by hand).
So yes, make it so. Please.
Linus
--
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/