[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0807271511120.3486@nehalem.linux-foundation.org>
Date: Sun, 27 Jul 2008 15:17:14 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...IV.linux.org.uk>
cc: Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Travis <travis@....com>,
Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [git pull] cpus4096 fixes
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists