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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 B432CC64E8A for ; Wed, 2 Dec 2020 11:44:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0CB9B20709 for ; Wed, 2 Dec 2020 11:44:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CB9B20709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4580B8D0001; Wed, 2 Dec 2020 06:44:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 409766B005D; Wed, 2 Dec 2020 06:44:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 31EAA8D0001; Wed, 2 Dec 2020 06:44:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 187936B005C for ; Wed, 2 Dec 2020 06:44:02 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CD0B0824999B for ; Wed, 2 Dec 2020 11:44:01 +0000 (UTC) X-FDA: 77548158282.07.low10_2e0cc32273b2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id B4D531803F9B2 for ; Wed, 2 Dec 2020 11:44:01 +0000 (UTC) X-HE-Tag: low10_2e0cc32273b2 X-Filterd-Recvd-Size: 3122 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Dec 2020 11:44:01 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 17582AB7F; Wed, 2 Dec 2020 11:44:00 +0000 (UTC) Date: Wed, 2 Dec 2020 11:43:57 +0000 From: Mel Gorman To: Huang Ying Cc: Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Matthew Wilcox (Oracle)" , Rafael Aquini , Andrew Morton , Ingo Molnar , Rik van Riel , Johannes Weiner , Dave Hansen , Andi Kleen , Michal Hocko , David Rientjes , linux-api@vger.kernel.org Subject: Re: [PATCH -V6 RESEND 2/3] NOT kernel/man-pages: man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING Message-ID: <20201202114357.GW3306@suse.de> References: <20201202084234.15797-1-ying.huang@intel.com> <20201202084234.15797-3-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201202084234.15797-3-ying.huang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Dec 02, 2020 at 04:42:33PM +0800, Huang Ying wrote: > Signed-off-by: "Huang, Ying" > --- > man2/set_mempolicy.2 | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2 > index 68011eecb..3754b3e12 100644 > --- a/man2/set_mempolicy.2 > +++ b/man2/set_mempolicy.2 > @@ -113,6 +113,12 @@ A nonempty > .I nodemask > specifies node IDs that are relative to the set of > node IDs allowed by the process's current cpuset. > +.TP > +.BR MPOL_F_NUMA_BALANCING " (since Linux 5.11)" > +Enable the Linux kernel NUMA balancing for the task if it is supported > +by kernel. > +If the flag isn't supported by Linux kernel, return -1 and errno is > +set to EINVAL. > .PP > .I nodemask > points to a bit mask of node IDs that contains up to > @@ -293,6 +299,9 @@ argument specified both Should this be expanded more to clarify it applies to MPOL_BIND specifically? Maybe the first patch should be expanded more and explictly fail if MPOL_F_NUMA_BALANCING is used with anything other than MPOL_BIND? > .B MPOL_F_STATIC_NODES > and > .BR MPOL_F_RELATIVE_NODES . > +Or, the > +.B MPOL_F_NUMA_BALANCING > +isn't supported by the Linux kernel. This will be difficult for an app to distinguish but we can't go back in time and make this ENOSYS :( The linux-api people might have more guidance but it may go to the extent of including a small test program in the manual page for a sequence that tests whether MPOL_F_NUMA_BALANCING works. They might have a better recommendation on how it should be handled. -- Mel Gorman SUSE Labs