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 B3813C433FE for ; Mon, 28 Feb 2022 15:15:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237494AbiB1PPq (ORCPT ); Mon, 28 Feb 2022 10:15:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234565AbiB1PPp (ORCPT ); Mon, 28 Feb 2022 10:15:45 -0500 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4F0181183 for ; Mon, 28 Feb 2022 07:15:05 -0800 (PST) Received: by mail-yb1-xb29.google.com with SMTP id u3so21156505ybh.5 for ; Mon, 28 Feb 2022 07:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/DGYCHAP536Nvul99EDTG6hckPiPqs15TjdAiXjOtBM=; b=tVv4ipPxKA03xgTq4Dk1zw4CZCbm4XSeZKExWKEF2kL+Ubm0tK0Ln/uN0xG/ZAf+32 SPCvUnyR0gqw+AsgGfTCnYYbi/VGmxyF5OiG6Nre9MBzbGP/LvxPZN9hky45/QD19wDg fZmdRtMjQCHCs6rV3Zoj08xvLSGbHvJQOGy2SGADfTfofnGtiRoXny68fLcXENZdG5T4 H24IaYQPHJ4hyNlZnJnFwwfLO3kXKa2ebKHx7S8txcPIDu4vQfYiQnQwanJm+1vnnsHP SfMVdvqF46ReLi28NzQz3Qq4bGX9cCQ99Do+2SdcijBor1wiIfq+f//kjPqZ5BXLBwyI HCPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/DGYCHAP536Nvul99EDTG6hckPiPqs15TjdAiXjOtBM=; b=00wPKuOCH7XTi0/kHrSOrpMaeRYGH49ZGGY+zW70WfFK6cPQr6n1q2Xlknlo0jinNM 835I0+waosGf9mu/2Gr6GvW24h0v+t4Rj4tll1QSK1tYUEjpG8IvwnDda/wAZEy1GEOL ZctBcSpogyGVWTB0HgsOVTzw9lSJu88zoBXUArSdjqzRYVpBTSstos0JiVRiQiOzHJeT ucTcuoJ8jVKRaF9oernGhpKjo3Qnlx8oJQ9YsBquEzjXZi4dqBcOzRl9yvW+ZpD60dOP P1VOgHtLUuBJz88jR8t0+LOuGEPhVHx7cQZr8PcFSkqKOO0uWYttyc8x37+AAsWyGqEF EwFg== X-Gm-Message-State: AOAM532GgN+A7YlBdJAHsxUUKFmagOy/tIeCBTTddubOwf5r+8j7KQl4 1IAPdLfSfP3u6SRwy/LlVpEQDd6Sw+3A6eIfxxCGAA== X-Google-Smtp-Source: ABdhPJxlij0ufjiN92AH1OyL8pyemHJU/TWzZLp6QiY6vkNQ+FWGQvbI5YCIn5OheXrUj61MFz1apjjwLuJHsGh+4O4= X-Received: by 2002:a25:d2cd:0:b0:61d:6a33:8129 with SMTP id j196-20020a25d2cd000000b0061d6a338129mr19241308ybg.246.1646061303068; Mon, 28 Feb 2022 07:15:03 -0800 (PST) MIME-Version: 1.0 References: <20220228071022.26143-1-songmuchun@bytedance.com> <20220228071022.26143-4-songmuchun@bytedance.com> In-Reply-To: From: Muchun Song Date: Mon, 28 Feb 2022 23:14:27 +0800 Message-ID: Subject: Re: [PATCH 3/3] mm: hugetlb: add hugetlb_free_vmemmap sysctl To: Luis Chamberlain Cc: Jonathan Corbet , Mike Kravetz , Andrew Morton , Kees Cook , Iurii Zaikin , Linux Doc Mailing List , LKML , Linux Memory Management List , Xiongchun duan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 28, 2022 at 10:42 PM Luis Chamberlain wrote: > > 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. > I also have realized this when reading another patch [1]. I will move this into its hugetlb related code. Anyway, thanks for your suggestion. [1] https://lore.kernel.org/linux-fsdevel/20220220060626.15885-1-tangmeng@uniontech.com/