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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 17906C433E0 for ; Wed, 3 Feb 2021 14:16:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 765F264F41 for ; Wed, 3 Feb 2021 14:16:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 765F264F41 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DD1396B0005; Wed, 3 Feb 2021 09:16:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D329D6B0006; Wed, 3 Feb 2021 09:16:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BD3276B006E; Wed, 3 Feb 2021 09:16:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0149.hostedemail.com [216.40.44.149]) by kanga.kvack.org (Postfix) with ESMTP id A28646B0005 for ; Wed, 3 Feb 2021 09:16:03 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5BD85181AEF10 for ; Wed, 3 Feb 2021 14:16:03 +0000 (UTC) X-FDA: 77777155806.07.event20_1a0224a275d4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 3B7D21803F9AC for ; Wed, 3 Feb 2021 14:16:03 +0000 (UTC) X-HE-Tag: event20_1a0224a275d4 X-Filterd-Recvd-Size: 2769 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Feb 2021 14:16:02 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 67821ACB0; Wed, 3 Feb 2021 14:16:01 +0000 (UTC) Date: Wed, 3 Feb 2021 15:15:58 +0100 From: Oscar Salvador To: David Hildenbrand Cc: Andrew Morton , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] x86/vmemmap: Drop handling of 1GB vmemmap ranges Message-ID: <20210203141553.GA26770@linux> References: <20210203104750.23405-1-osalvador@suse.de> <20210203104750.23405-3-osalvador@suse.de> <20210203141038.GA26693@linux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Feb 03, 2021 at 03:12:05PM +0100, David Hildenbrand wrote: > On 03.02.21 15:10, Oscar Salvador wrote: > > On Wed, Feb 03, 2021 at 02:33:56PM +0100, David Hildenbrand wrote: > > > One problem I see with existing code / this change making more obvious is > > > that when trying to remove in other granularity than we added (e.g., unplug > > > a 128MB DIMM avaialble during boot), we remove the direct map of unrelated > > > DIMMs. > > > > So, let me see if I understand your concern. > > > > We have a range that was mapped with 1GB page, and we try to remove > > a 128MB chunk from it. > > Yes, in that case we would clear the pud, and that is bad, so we should > > keep the PAGE_ALIGNED checks. > > > > Now, let us assume that scenario. > > If you have a 1GB mapped range and you remove it in smaller chunks bit by bit > > (e.g: 128M), the direct mapping of that range will never be cleared unless > > No, that's exactly what's happening. Good thing is that it barely ever > happens, so I assume leaving behind some direct mapping / page tables is not > that bad. Sorry, I meant that that is the current situation now. Then let us keep the PAGE_ALIGNED stuff. I shall resend a v3 later today. thanks for the review ;-) -- Oscar Salvador SUSE L3