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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 449AEC4320A for ; Mon, 23 Aug 2021 19:17:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CDD0461214 for ; Mon, 23 Aug 2021 19:17:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CDD0461214 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 5CAB26B006C; Mon, 23 Aug 2021 15:17:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 57AF26B0072; Mon, 23 Aug 2021 15:17:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 442388D0001; Mon, 23 Aug 2021 15:17:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 26E016B006C for ; Mon, 23 Aug 2021 15:17:25 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D0E1C824999B for ; Mon, 23 Aug 2021 19:17:24 +0000 (UTC) X-FDA: 78507304008.24.0460E4B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf02.hostedemail.com (Postfix) with ESMTP id 78E5E700177A for ; Mon, 23 Aug 2021 19:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629746244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hfa5vNFo38/k45EAS0ocbtPh3eTQnzy51Lm4DUgg6zo=; b=dnqH7EzwJ9zG8AXJa8kKq7uY2Ptfws+Qrnm8Qs/1DrHjMZU6C6RR7QnhS9RzFBMwVz2673 uTw5JLXeNnvkr/JuifgG5+fBRUFXIWR3hj3d49xNs35LElipgBQohVdhruHbh4/dQ9hJTd e+ENPAlddE/ShEXbkBboPM32zmfVprg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-590-Dj12yRMnMAeWkcfM3bnfYw-1; Mon, 23 Aug 2021 15:17:22 -0400 X-MC-Unique: Dj12yRMnMAeWkcfM3bnfYw-1 Received: by mail-wm1-f71.google.com with SMTP id r11-20020a05600c35cb00b002e706077614so329574wmq.5 for ; Mon, 23 Aug 2021 12:17:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=hfa5vNFo38/k45EAS0ocbtPh3eTQnzy51Lm4DUgg6zo=; b=ubSNoDflm2KLrn+aBK+MFR6efiaPOurgODR+IAcZZ2aExk/HRoWvC304Snr4Myi84P wS6K0FowxpJZesgY1TMZdeB+m6KAcjsDt3u4BGuu3jzkjMtd1SsJ28BH0Lk51kRlYJdW 7BAE/vM0D/2iyIf3PqDAdKjPlnqAQ3SjIGPol5RtAjwHfUZhcY7TTuk3NQe9H8ZTHcdQ UKA5ou4j1E6gHynYzlmZJJ6rpkRTnily/CeMbX5fZZVgVNiQ4jbcygf+U5zy75V7DSWf o2z7CXcfkUqL3VJc+uK88Rr0cXCFgVhL13/6+zy1b0mvBLT+rnvuVqR2uftqc5xcBycT kvgg== X-Gm-Message-State: AOAM531cuq865jJcnTwcjp2AdADFFzsBpu/R4DPLGb45yeEn0Q1ES90W nMwEyfRpQpD2d1AD3+Nz38DvDyApF85j+CCUk7CoklM/YzV8S7oeLgeJ51xUY95nKzVxLgPKs6u 25NDmMN8bknbDA0h5Ee2Bfrw5U2GBiVt+1+oi7zR2s7UQdz4bCpyPgJbRc+k= X-Received: by 2002:a5d:4b01:: with SMTP id v1mr14808701wrq.377.1629746241274; Mon, 23 Aug 2021 12:17:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCCa98KM7/EeqgBJubHh9aDYEDS2dcPiXFmf/SLIfXyxzg0Qtn0czsk3yMiJSWGjR9BG9PAg== X-Received: by 2002:a5d:4b01:: with SMTP id v1mr14808679wrq.377.1629746241045; Mon, 23 Aug 2021 12:17:21 -0700 (PDT) Received: from [192.168.3.132] (p5b0c60c6.dip0.t-ipconnect.de. [91.12.96.198]) by smtp.gmail.com with ESMTPSA id q22sm58557wmj.32.2021.08.23.12.17.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 12:17:20 -0700 (PDT) Subject: Re: [PATCH V1] hugetlbfs: Extend the definition of hugepages parameter to support node allocation To: yaozhenguo , mike.kravetz@oracle.com, corbet@lwn.net, akpm@linux-foundation.org Cc: yaozhenguo@jd.com, willy@infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org References: <20210823130154.75070-1-yaozhenguo1@gmail.com> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Mon, 23 Aug 2021 21:17:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210823130154.75070-1-yaozhenguo1@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dnqH7Ezw; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf02.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 78E5E700177A X-Stat-Signature: 597xjqntwxq53grciueugzy5qruzbkbe X-HE-Tag: 1629746244-525060 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 23.08.21 15:01, yaozhenguo wrote: > We can specify the number of hugepages to allocate at boot. But the > hugepages is balanced in all nodes at present. In some scenarios, > we only need hugepags in one node. For example: DPDK needs hugepages > which is in the same node as NIC. if DPDK needs four hugepags of 1G > size in node1 and system has 16 numa nodes. We must reserve 64 hugepags > in kernel cmdline. But, only four hugepages is used. The others should > be free after boot.If the system memory is low(for example: 64G), it will > be an impossible task. So, extend hugepages kernel parameter to specify > node number of hugepages to allocate at boot. > For example add following parameter: > > hugepagesz=1G hugepages=0:1,1:3 > > It will allocate 1 hugepags in node0 and 3 hugepages in node1. I like this format. -- Thanks, David / dhildenb