Messages in this thread | | | Date | Sun, 27 Jul 2008 22:05:47 +0100 | From | Al Viro <> | Subject | Re: [git pull] cpus4096 fixes |
| |
On Sun, Jul 27, 2008 at 01:15:26PM -0700, Linus Torvalds wrote:
> So when you have 4k CPU's, instead of having 4k arrays (of 4k bits each, > with one bit set in each array - 2MB memory total), you have exactly 64 > arrays instead, each 8k bits in size (64kB total).
> And once you're not being a total idiot about wasting memory that is just > filled with a single bit in various different places, you don't need all > those games to re-create the arrays in some dense format, because they're > already going to be dense enough. If you compile a kernel for up to 4k > CPU's, "wasting" that 64kB of memory is a non-issue (especially since by > doing this "overlapping" trick you probbaly get better cache behaviour > anyway). > > Ok, so now that I've insulted you and your pets (they're ugly!), show me > wrong, and then call me a d*ckhead. ("Linus - you're a d*ckhead, and you > didn't understand the problem, so you're a _stupid_ d*ckhead. And my > pet may be ugly, but yours _smells_ bad!"). > > Or say "Uh, yeah, we're morons, and here's the much better patch, and we > won't do that again".
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...?
| |