Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2998582pxm; Mon, 28 Feb 2022 10:01:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFNYbNk6zSLUrHVMalIwt+oGce1rmzMv/gZ+5/Cg7sXypZT1DsMVpobhKWCuv7AXdRhhuZ X-Received: by 2002:a17:90a:ff03:b0:1bc:64f4:64e7 with SMTP id ce3-20020a17090aff0300b001bc64f464e7mr17826926pjb.57.1646071292511; Mon, 28 Feb 2022 10:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646071292; cv=none; d=google.com; s=arc-20160816; b=KIsq6yces7k+HqpyxpOz0UOJwdEMD+Dpq2jWgABPrdPwI/B9IbZuA1v2bHfkiynCs+ jE/Bf75kZkGhEuX7XekmuXt4CgvibK4a+s4D47zdWaqfDtIHjGIHJHfkq4qHXFSRlWOX QHwBZ5gb+Ndsc2nqgviJ9lhVf0bfKzegKOtLnl6M1tBMF8WO8BMx2kh9mm0UgtV9T1VP a9f4JQnbT/3SfJ9AuPJAULgFRsqpoKd4rjdi+KuFlGuYO017W25RuzhgQDHzHO9P6mWh CqXocCJ+sfu46zjoVJcUfaFFii6TiuW65vQOCG/1ADariuVmDdSe9rmtukQkMc36lH4/ KUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ujPnOWbvLWDuP5VEFGAmYpTMedCZmNkrYJPtv8OTgqQ=; b=u6/Eb+neqHqj8D8Anclk0I73vX/fTOUvLQLnJYMSMrQiZ5E5TiiKKZq8woT5wsV4Ph 60t5FmafuswRriVJeUXNkWdI4xIC1MCTOFc2twkzpfO5bUufP8d4qI3mCbUj2BXBdcZQ EF3W8z6ZlSTDpQ3FbJqf4YkPT4/bOvPT5qnO/VpQX8m/itbx12q83IoByjgh32K7WjuT HY9T28H64kvaqMtYFWByBEnNxPRAriL4URWdr+9XX0GJybjsTCKd0HtgY2yAM9QFGlMQ 3qK+k4JC+R/01LKirAWR1ujoly1jembITqc/9qmFT5yyQ1dd6RYJ1srRe74J0S80USmu FVRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iVE4UwL1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c29-20020a056a00009d00b004ce1a7d170asi9264742pfj.100.2022.02.28.10.01.16; Mon, 28 Feb 2022 10:01:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iVE4UwL1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237238AbiB1Omo (ORCPT + 99 others); Mon, 28 Feb 2022 09:42:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbiB1Omm (ORCPT ); Mon, 28 Feb 2022 09:42:42 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 513757EDA0; Mon, 28 Feb 2022 06:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ujPnOWbvLWDuP5VEFGAmYpTMedCZmNkrYJPtv8OTgqQ=; b=iVE4UwL1JqhBMEMkDuJQY0xTXQ JaVXp5Bd8Yzr8lQfhEw7pOAb+wVaZ0k2Bqldk7xK9BtTaACFMnRhnmn6HSVmLzldB5sp21KtBJD2s jV8Y0f7PHUOeisnC9I63cue51CRJpXyzicCI/QKRl7E5u0hpW5MM7bz7/oU9ril60op8c+VK+9vE7 nJ0voNLfy5LOnljS8MqkQakszidWPIwAAJp6mvMoT/CwcdnOqYMxIAsAURXOrfXoFbF+aQqX7CO7D q0B190hD32ZZfNHTIdXTQdkjrS3RfcbC5hFZLqJn6nDhJ3vjbTy61KXeOs0zTXMRVr88Ehx0bGbkO fPEK2xxw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOhDr-00CyXK-U6; Mon, 28 Feb 2022 14:41:59 +0000 Date: Mon, 28 Feb 2022 06:41:59 -0800 From: Luis Chamberlain To: Muchun Song Cc: corbet@lwn.net, mike.kravetz@oracle.com, akpm@linux-foundation.org, keescook@chromium.org, yzaikin@google.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, duanxiongchun@bytedance.com Subject: Re: [PATCH 3/3] mm: hugetlb: add hugetlb_free_vmemmap sysctl Message-ID: References: <20220228071022.26143-1-songmuchun@bytedance.com> <20220228071022.26143-4-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220228071022.26143-4-songmuchun@bytedance.com> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 28, 2022 at 03:10:22PM +0800, Muchun Song wrote: > We must add "hugetlb_free_vmemmap=on" to boot cmdline and reboot the > server to enable the feature of freeing vmemmap pages of HugeTLB > pages. Rebooting usually taske a long time. Add a sysctl to enable > the feature at runtime and do not need to reboot. > > Signed-off-by: Muchun Song > --- > Documentation/admin-guide/sysctl/vm.rst | 13 +++++++++++++ > include/linux/hugetlb.h | 5 +++++ > include/linux/memory_hotplug.h | 1 + > kernel/sysctl.c | 11 +++++++++++ kernel/sysctl.c is a hot mess with tons of knobs from all over the place. And so we've been moving these to their own place. For instance all the filesystem knobs are now properly in fs/. So Adding new ones to the file is undesirable. If this is going to be added, please add it somewhere in mm / hugetlb code. Luis