From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48F83C388F9 for ; Tue, 3 Nov 2020 19:00:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C503220870 for ; Tue, 3 Nov 2020 19:00:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Wh43mnWM"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="STcwQ6Ra" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C503220870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 41B1D6B0036; Tue, 3 Nov 2020 14:00:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3CA1C6B005D; Tue, 3 Nov 2020 14:00:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E0126B0068; Tue, 3 Nov 2020 14:00:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id F0E036B005D for ; Tue, 3 Nov 2020 14:00:25 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 819E5180AD801 for ; Tue, 3 Nov 2020 19:00:25 +0000 (UTC) X-FDA: 77444022810.08.show65_4f07f60272bb Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 4AA4A1819E76F; Tue, 3 Nov 2020 19:00:25 +0000 (UTC) X-HE-Tag: show65_4f07f60272bb X-Filterd-Recvd-Size: 5615 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf17.hostedemail.com (Postfix) with ESMTP; Tue, 3 Nov 2020 19:00:23 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604430021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p7vA0Pp8Yw32NcCmeGMglrNZNTsusNNmUR0JbokXn0s=; b=Wh43mnWM8kdYti+K6Ejg70IQfa+GmZ8DCSo20FQE/hkLNmxVT4iphQnlk6m40FPrmWktQO 8ayXKz0ztE1cqx/iEhmcbhojQh9yCHEkFANOGr1w8fGEwrPOcrWAWxi/OenSb5evTEILWa oclhRZDu2W0eltn+sc+1j25HCEzKjNSXz+4io/CbYUyMFuxTbNnNJEiCm1jMBn8PGej5s3 E3JpbZR0aFWpI6lV+SZv22HUNUyPWbXG8oMYz+BmJikgi+ivLhTWpXqqgXf53DcJR+Ltrn dCfpJUdQQNPCTgPlSMPzbs0whzNCaCVS/fZbTm34UVovthqkFff3qyFpeY0sbA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604430021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=p7vA0Pp8Yw32NcCmeGMglrNZNTsusNNmUR0JbokXn0s=; b=STcwQ6RaI64DeextSGHfCvrA9zLqnmZlfhd6kn3GgHfcpWRfVbJIkhHpoM7lA8B8jXR4lp QBLUYE/euA+zomCg== 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 , Arnd Bergmann , Linux ARM , linux-csky@vger.kernel.org, Michal Simek , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Nick Hu , Greentime Hu , Vincent Chen , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev , "David S. Miller" , linux-sparc , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Christian Koenig , Huang Rui , David Airlie , Daniel Vetter , dri-devel , VMware Graphics , Roland Scheidegger , Dave Airlie , Gerd Hoffmann , virtualization@lists.linux-foundation.org, spice-devel@lists.freedesktop.org, Ben Skeggs , nouveau@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , intel-gfx Subject: Re: [patch V3 22/37] highmem: High implementation details and document API In-Reply-To: References: <20201103092712.714480842@linutronix.de> <20201103095858.827582066@linutronix.de> Date: Tue, 03 Nov 2020 20:00:20 +0100 Message-ID: <87y2ji1d17.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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