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 F2A49C433E0 for ; Wed, 3 Feb 2021 14:17:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACD5F64F41 for ; Wed, 3 Feb 2021 14:17:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbhBCOQq (ORCPT ); Wed, 3 Feb 2021 09:16:46 -0500 Received: from mx2.suse.de ([195.135.220.15]:59288 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232575AbhBCOQm (ORCPT ); Wed, 3 Feb 2021 09:16:42 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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