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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75500C433F5 for ; Mon, 11 Oct 2021 02:13:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A3CD60F3A for ; Mon, 11 Oct 2021 02:13:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9A3CD60F3A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C668A6B006C; Sun, 10 Oct 2021 22:13:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C16546B0071; Sun, 10 Oct 2021 22:13:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ADE7E6B0072; Sun, 10 Oct 2021 22:13:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id A216F6B006C for ; Sun, 10 Oct 2021 22:13:25 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 48FE018021BA4 for ; Mon, 11 Oct 2021 02:13:25 +0000 (UTC) X-FDA: 78682534770.39.B2277E3 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by imf21.hostedemail.com (Postfix) with ESMTP id CEA73D03EEF7 for ; Mon, 11 Oct 2021 02:13:23 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R671e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UrJKsBw_1633918399; Received: from 30.21.164.80(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UrJKsBw_1633918399) by smtp.aliyun-inc.com(127.0.0.1); Mon, 11 Oct 2021 10:13:20 +0800 Subject: Re: [PATCH] hugetlb: Support node specified when using cma for gigantic hugepages To: Andrew Morton Cc: mike.kravetz@oracle.com, mhocko@kernel.org, guro@fb.com, corbet@lwn.net, yaozhenguo1@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org References: <1633843448-966-1-git-send-email-baolin.wang@linux.alibaba.com> <20211010135507.f2d1c6bcaeecc82d6d025604@linux-foundation.org> From: Baolin Wang Message-ID: Date: Mon, 11 Oct 2021 10:14:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211010135507.f2d1c6bcaeecc82d6d025604@linux-foundation.org> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf21.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.45 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: CEA73D03EEF7 X-Stat-Signature: 1gd1ig1grgod6zcdg6rh6wzkdij5at3q X-HE-Tag: 1633918403-159702 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 2021/10/11 4:55, Andrew Morton wrote: > On Sun, 10 Oct 2021 13:24:08 +0800 Baolin Wang wrote: > >> Now the size of CMA area for gigantic hugepages runtime allocation is >> balanced for all online nodes, but we also want to specify the size of >> CMA per-node, or only one node in some cases, which are similar with > > Please describe in full detail why "we want to" do this. In other > words, what is the benefit to our users? What are the use-cases, etc? Sure. On some multi-nodes systems, each node's memory can be different, allocating the same size of CMA for each node is not suitable for the low-memory nodes. Meanwhile some workloads like DPDK mentioned by Zhenguo only need hugepages in one node. On the other hand, we have some machines with multiple types of memory, like DRAM and PMEM (persistent memory). On this system, we may want to specify all the hugepages on DRAM node, or specify the proportion of DRAM node and PMEM node, to tuning the performance of the workloads.