Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2889402pxm; Mon, 28 Feb 2022 08:01:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2DEGOj0tJTMqMD9zuNi3ZFEzRUesSIzC0NZon8VYqVeF6rT4O1qQXNcRUVyySEfFd1Yhn X-Received: by 2002:a05:6402:11cf:b0:407:1939:9a4e with SMTP id j15-20020a05640211cf00b0040719399a4emr20086107edw.298.1646064073088; Mon, 28 Feb 2022 08:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646064073; cv=none; d=google.com; s=arc-20160816; b=0aXBMR6jAxW8gIcamJ4wsk/jEPppCNXhr4qs8uhxcGiB2qCDuvdh69nDWxg1XlYeyF ANJdsa19BqcGoLFctiaKEYsJ7CR/PIvX2u9ITqvcrMozo/XbsPIHzg70MH9h3UFqxFjE nmDXpeh22FCjT5ORBPK+kjTWO5xE+OYCnsJYd8iTw99noef85ywDREMY2IkM+/zyrK90 /ejE6+uWf2tzhZoflPCFaa+Yk4nhesihy3EfkHViRuowgO9Ct7rr3xMyvAXnTXUc+smT jG+cNgxp2MG4Y2snELoV3/jS1UNK2Z7C5l/9dyRpMhvCA8wcNA7qjNzoT7d1Z1LG1Q8R tT/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/DGYCHAP536Nvul99EDTG6hckPiPqs15TjdAiXjOtBM=; b=AXq1dODZLKFOekZtBJkHPGo+DwFBjlQIc735PYo8iihzdgLrA/hH2+TVlHTsc1sq+s rLf1XKbHahV3vRliYrHIMrtRnnynHTyTEf8I1i4JgJaereBvqhZ+V3rab+GQUL5Xuc4J ECEXyCfDF2aiorXo9hVll8FC5TqROOQ5uTzpvtfPwz2mY+7QBhpxHY8HrgAWar0oz6nL XK/jw2fO93Ij+dT7MpkisMWsWKFnU1Zz2AVxz93IGWtuuaea85DQf9RNaKcQnxAdARic e1jq1bGWxXUVvm8fZZqTpIbTu7gRlbJZc1TQgzoFBGkneUbjNReZiRUsLddusZbsSRcJ qDJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=tVv4ipPx; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a1709063b8800b006b7b304cd7dsi7778392ejf.493.2022.02.28.08.00.48; Mon, 28 Feb 2022 08:01:13 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=tVv4ipPx; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237491AbiB1PPq (ORCPT + 99 others); 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-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" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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/