From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <19990817111350.B296@bug.ucw.cz> Date: Tue, 17 Aug 1999 11:13:50 +0200 From: Pavel Machek Subject: Re: [bigmem-patch] 4GB with Linux on IA32 References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: ; from Andrea Arcangeli on Tue, Aug 17, 1999 at 12:47:50AM +0200 Sender: owner-linux-mm@kvack.org Return-Path: To: Andrea Arcangeli , Alan Cox Cc: Kanoj Sarcar , torvalds@transmeta.com, sct@redhat.com, Gerhard.Wichert@pdb.siemens.de, Winfried.Gerhard@pdb.siemens.de, linux-kernel@vger.rutgers.edu, linux-mm@kvack.org List-ID: Hi! > 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. Your patches start to contain more ifdefs than code. That's bad. > diff -urN 2.3.13-bigmem-L/fs/proc/mem.c tmp/fs/proc/mem.c > --- 2.3.13-bigmem-L/fs/proc/mem.c Tue Jul 13 02:02:09 1999 > +++ tmp/fs/proc/mem.c Tue Aug 17 00:02:48 1999 > @@ -15,6 +15,9 @@ > #include > #include > #include > +#ifdef CONFIG_BIGMEM > +#include > +#endif These ifdefs are probably not needed. Few unused symbols can not hurt, can they? And if you are worried, put #ifdef pair into asm/bigmem.h, not into every file. > @@ -120,7 +123,13 @@ > i = PAGE_SIZE-(addr & ~PAGE_MASK); > if (i > scount) > i = scount; > +#ifdef CONFIG_BIGMEM > + page = (char *) kmap((unsigned long) page, KM_READ); > +#endif What about kmap existing uncoditionaly, but (inside bigmem.h) #ifdef CONFIG_BIGMEM #define kmap(a,b) real_kmap(a,b) #else #define kmap(a,b) a #endif ? Doing this and same for kunmap would save lots of painfull #ifdefs otherwhere. Pavel -- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- 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/