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 5B08EC4361B for ; Mon, 8 Mar 2021 18:49:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3206465298 for ; Mon, 8 Mar 2021 18:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbhCHSs4 (ORCPT ); Mon, 8 Mar 2021 13:48:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:39224 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbhCHSso (ORCPT ); Mon, 8 Mar 2021 13:48:44 -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 98111AC1F; Mon, 8 Mar 2021 18:48:43 +0000 (UTC) Date: Mon, 8 Mar 2021 19:48:40 +0100 From: Oscar Salvador To: Dave Hansen Cc: Andrew Morton , David Hildenbrand , 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 v4 2/3] x86/vmemmap: Drop handling of 1GB vmemmap ranges Message-ID: <20210308184840.GC25767@linux> References: <20210301083230.30924-1-osalvador@suse.de> <20210301083230.30924-3-osalvador@suse.de> <62c5b490-353a-ca3a-d2c8-f02189210c32@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <62c5b490-353a-ca3a-d2c8-f02189210c32@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 04, 2021 at 10:42:59AM -0800, Dave Hansen wrote: > On 3/1/21 12:32 AM, Oscar Salvador wrote: > > We never get to allocate 1GB pages when mapping the vmemmap range. > > Drop the dead code both for the aligned and unaligned cases and leave > > only the direct map handling. > > Could you elaborate a bit on why 1GB pages are never used? It is just > unlikely to have a 64GB contiguous area of memory that needs 1GB of > contiguous vmemmap? Or, does the fact that sections are smaller than > 64GB keeps this from happening? AFAIK, the biggest we populate vmemmap pages with is 2MB, plus the fact that as you pointed out, memory sections on x86_64 are 128M, which is way smaller than what would require to allocate a 1GB for vmemmap pages. Am I missing something? -- Oscar Salvador SUSE L3