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 63CC4C433E0 for ; Wed, 3 Feb 2021 14:10:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C0B3764E50 for ; Wed, 3 Feb 2021 14:10:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0B3764E50 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 EA15F6B0005; Wed, 3 Feb 2021 09:10:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E51B06B006E; Wed, 3 Feb 2021 09:10:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D66CC6B0070; Wed, 3 Feb 2021 09:10:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0188.hostedemail.com [216.40.44.188]) by kanga.kvack.org (Postfix) with ESMTP id BD6D46B0005 for ; Wed, 3 Feb 2021 09:10:47 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 74D2F181AEF07 for ; Wed, 3 Feb 2021 14:10:47 +0000 (UTC) X-FDA: 77777142534.08.bell79_4108e6b275d4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 4D5121819E766 for ; Wed, 3 Feb 2021 14:10:47 +0000 (UTC) X-HE-Tag: bell79_4108e6b275d4 X-Filterd-Recvd-Size: 2230 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Wed, 3 Feb 2021 14:10:46 +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 8053CACBA; Wed, 3 Feb 2021 14:10:45 +0000 (UTC) Date: Wed, 3 Feb 2021 15:10:42 +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: <20210203141038.GA26693@linux> References: <20210203104750.23405-1-osalvador@suse.de> <20210203104750.23405-3-osalvador@suse.de> 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 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 I am missing something (and the pagetables won't be freed) ? -- Oscar Salvador SUSE L3