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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 CD336C4361B for ; Tue, 8 Dec 2020 02:27:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A62C239D4 for ; Tue, 8 Dec 2020 02:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727833AbgLHC1W (ORCPT ); Mon, 7 Dec 2020 21:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbgLHC1W (ORCPT ); Mon, 7 Dec 2020 21:27:22 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FFDCC0613D6 for ; Mon, 7 Dec 2020 18:26:42 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id 11so6176542pfu.4 for ; Mon, 07 Dec 2020 18:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8uyek9MkTmVFbzSBRjPGvZAHmGE/+Xxg4KtWWjpNIQM=; b=YPa5oW5Hgi1GhmfO+I8COAhhJ1zpJhBu3US5LoUescGZWhMX6Y3lQW0U3KTjwmn293 fhctzsSt5F9cFgmK4rpOaoVzygUNv/wq0alLedG+kjPBThKbaDnIxgVVEnpKstL2f98S VlE7DpOtpIrICE5enlkHBREoTYhqvZW+vCfyCwfzgJrqLOLOF1JWnCq+C8BGfgYcqC8V kEAEiKYAvFcbyNPJnR9rVKS/Rt3z5c+UNoVCewMEvV1F4yVXI54ukFZmnOJG+6mRssyS UFSxwr0DtKP8q2Rf8O+wrblQwBigLOhR1/8jOT2rwGyN6a+A4uvUsKcmFHBa1+C5ojzM KX+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8uyek9MkTmVFbzSBRjPGvZAHmGE/+Xxg4KtWWjpNIQM=; b=SOd55qBlUJaT8vTsHLNI21Z2/74/Z/HLZ/aaWxpUwHEBiSUu5QFmof40u//zwqC4RR CT6IKw7WRGRnh/d9bdYTpfhz9JlepZ8yzdh7ZVkBwMFVOh//I6GSA7P7BnRn3Uc0fJcl 5hMncCMdZURvQdjTJL2jN2Cs5g/ZC3Qa2Yd9RiytwKvykuopP+vtFsuGRf+zJ4wjzVTq KOIPB3gCnAIeJufIyQWsuDdPevp7meYvQE9cahQg35KLyJ7+/sk6HOrnRenifi/w2k0C bpbZM0IaebFCAALX3RsL40skGbZGOGNa36PGuL7RduRCOMdjEzT7s/nRg0dLMDDpqZiu biAg== X-Gm-Message-State: AOAM5324x9BOoLgdDAFvhDOc8xmf8Ihn62Kv2kIeT2GBcCbjTgI/jdef RZRlrWdihh9HNrxHbpuCRHq2HG8qXFwmeKxJt8cycQ== X-Google-Smtp-Source: ABdhPJyCq3UF1fpgl0WcY/IWKImwVBiH+TUtaeJ0hWsOuC6cDWgqA4zTZpgtjMbTdH04swBbXun4cYCZlCpRJYe1Y4Q= X-Received: by 2002:a17:90a:ae14:: with SMTP id t20mr1867229pjq.13.1607394401606; Mon, 07 Dec 2020 18:26:41 -0800 (PST) MIME-Version: 1.0 References: <20201130151838.11208-1-songmuchun@bytedance.com> <600fd7e2-70b4-810f-8d12-62cba80af80d@oracle.com> <20201207183814.GA3786@localhost.localdomain> In-Reply-To: <20201207183814.GA3786@localhost.localdomain> From: Muchun Song Date: Tue, 8 Dec 2020 10:26:05 +0800 Message-ID: Subject: Re: [External] Re: [PATCH v7 00/15] Free some vmemmap pages of hugetlb page To: Oscar Salvador Cc: Mike Kravetz , Andrew Morton , Jonathan Corbet , dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org, bp@alien8.de, mingo@redhat.com, Thomas Gleixner , pawan.kumar.gupta@linux.intel.com, mchehab+huawei@kernel.org, paulmck@kernel.org, viro@zeniv.linux.org.uk, Peter Zijlstra , luto@kernel.org, oneukum@suse.com, jroedel@suse.de, Matthew Wilcox , David Rientjes , Mina Almasry , Randy Dunlap , anshuman.khandual@arm.com, Michal Hocko , "Song Bao Hua (Barry Song)" , Xiongchun duan , LKML , Linux Memory Management List , linux-doc@vger.kernel.org, linux-fsdevel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 2:38 AM Oscar Salvador wrote: > > On Fri, Dec 04, 2020 at 11:39:31AM +0800, Muchun Song wrote: > > On Fri, Dec 4, 2020 at 7:49 AM Mike Kravetz wrote: > > > As previously mentioned, I feel qualified to review the hugetlb changes > > > and some other closely related changes. However, this patch set is > > > touching quite a few areas and I do not feel qualified to make authoritative > > > statements about them all. I too hope others will take a look. > > > > Agree. I also hope others can take a look at other modules(e.g. > > sparse-vmemmap, memory-hotplug). Thanks for everyone's efforts > > on this. > > I got sidetracked by some other stuff but I plan to continue reviewing > this series. Many thanks, Oscar. > > One thing that came to my mind is that if we do as David suggested in > patch#4, and we move it towards the end to actually __enable__ this > once all the infrastructure is there (unless hstate->nr_vmemmap_pages > differs from 0 we should not be doing any work AFAIK), we could also > move patch#6 to the end (right before the enablement), kill patch#7 > and only leave patch#13. > > The reason for that (killing patch#7 and leaving patch#13 only) > is that it does not make much sense to me to disable PMD-mapped vmemmap > depending on the CONFIG_HUGETLB_xxxxx as that is enabled by default > to replace that later by the boot kernel parameter. > It looks more natural to me to disable it when we introduce the kernel > boot parameter, before the actual enablement of the feature. Thanks for your suggestions. I agree with you. :) > > As I said, I plan to start the review again, but the order above would > make more sense to me. > > thanks > > -- > Oscar Salvador > SUSE L3 -- Yours, Muchun