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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11270C433EF for ; Mon, 28 Feb 2022 14:42:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237241AbiB1Omp (ORCPT ); Mon, 28 Feb 2022 09:42:45 -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 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