From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759415AbYG0WVS (ORCPT ); Sun, 27 Jul 2008 18:21:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757727AbYG0WVG (ORCPT ); Sun, 27 Jul 2008 18:21:06 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:32930 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758151AbYG0WVF (ORCPT ); Sun, 27 Jul 2008 18:21:05 -0400 Date: Sun, 27 Jul 2008 15:17:14 -0700 (PDT) From: Linus Torvalds To: Al Viro cc: Ingo Molnar , Linux Kernel Mailing List , Andrew Morton , Mike Travis , Rusty Russell Subject: Re: [git pull] cpus4096 fixes In-Reply-To: <20080727210547.GC28946@ZenIV.linux.org.uk> Message-ID: References: <20080727190601.GA764@elte.hu> <20080727210547.GC28946@ZenIV.linux.org.uk> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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