From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 16 Aug 1999 23:29:48 -0700 (PDT) From: Linus Torvalds Subject: Re: [bigmem-patch] 4GB with Linux on IA32 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrea Arcangeli Cc: Alan Cox , Kanoj Sarcar , sct@redhat.com, Gerhard.Wichert@pdb.siemens.de, Winfried.Gerhard@pdb.siemens.de, linux-kernel@vger.rutgers.edu, linux-mm@kvack.org List-ID: On Tue, 17 Aug 1999, Andrea Arcangeli wrote: > > This incremental (against bigmem-2.3.13-L) patch will fix the ptrace and > /proc/*/mem read/writes to other process VM inside the kernel. Andrea, you really need to clean these things up. The bigmem patches look fine _except_ for the fact that they have these #ifdef CONFIG_BIGMEM turds all over the place. That's NOT how to do it. Instead, you should unconditionally always do #include which in turn does something like this: #ifdef CONFIG_BIGMEM #include #else #define kmap(page) page_address(page) #define kunmap(page) do { } while (0) #endif and then there is not a _single_ #ifdef inside any actual code. Remember: if you have to have #ifdef's in actual functional code, you're doing something wrong. I don't see why you can't just abstract the thing away with zero performance degradation for the non-bigmem case by just making the mapping function the existing identity function. I'd like you to do the above cleanup, and then the bigmem patches look like they could easily be integrated into the current 2.3.x series. But with #ifdef's it won't. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://humbolt.geo.uu.nl/Linux-MM/