From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [patch V3 22/37] highmem: High implementation details and document API Date: Tue, 03 Nov 2020 20:00:20 +0100 Message-ID: <87y2ji1d17.fsf@nanos.tec.linutronix.de> References: <20201103092712.714480842@linutronix.de> <20201103095858.827582066@linutronix.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: To: Linus Torvalds Cc: LKML , Peter Zijlstra , Paul McKenney , Christoph Hellwig , Sebastian Andrzej Siewior , Andrew Morton , Linux-MM , Alexander Viro , Benjamin LaHaise , linux-fsdevel , linux-aio@kvack.org, Chris Mason , Josef Bacik , David Sterba , linux-btrfs , the arch/x86 maintainers , Vineet Gupta , "open list:SYNOPSYS ARC ARCHITECTURE" , Russell King List-Id: nouveau.vger.kernel.org On Tue, Nov 03 2020 at 09:48, Linus Torvalds wrote: > I have no complaints about the patch, but it strikes me that if people > want to actually have much better debug coverage, this is where it > should be (I like the "every other address" thing too, don't get me > wrong). > > In particular, instead of these PageHighMem(page) tests, I think > something like this would be better: > > #ifdef CONFIG_DEBUG_HIGHMEM > #define page_use_kmap(page) ((page),1) > #else > #define page_use_kmap(page) PageHighMem(page) > #endif > > adn then replace those "if (!PageHighMem(page))" tests with "if > (!page_use_kmap())" instead. > > IOW, in debug mode, it would _always_ remap the page, whether it's > highmem or not. That would really stress the highmem code and find any > fragilities. Yes, that makes a lot of sense. We just have to avoid that for the architectures with aliasing issues. > Anyway, this is all sepatrate from the series, which still looks fine > to me. Just a reaction to seeing the patch, and Thomas' earlier > mention that the highmem debugging doesn't actually do much. Right, forcing it for both kmap and kmap_local is straight forward. I'll cook a patch on top for that. Thanks, tglx