Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp797246pxu; Wed, 2 Dec 2020 03:46:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYA5Hl2xWiRxCBi17BURmivCJKXd34IFbMwCi9ntyrk9DZs+V1DlRNRmZXNqZg2z2tBm4U X-Received: by 2002:a05:6402:5:: with SMTP id d5mr2115058edu.77.1606909595511; Wed, 02 Dec 2020 03:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606909595; cv=none; d=google.com; s=arc-20160816; b=AZlbKk9JfAWFOgsvz41TgebNaoSEbCMfH5M6yrzRgnEp9CUoV9u37CQerwoOAyFaKD 0HLG9de3GNr1nRSd3tj4jxDQnvyFkPZb8R0oKF8V7R0wW/0MCvV6oHinAxJ4K+M+Wx+X RQc2AQzDydKdThysw8HIcuVcoUPdu8uqTaC+F3T4BftG4PPHkZgYLrJQ8GZ/FL5/STfd ZN8ktBP026iLcehRA+g1FE3qpbBYn0meQGHV9BNU07teXKJcZs01EHVFdka1FE1UF8Wg buClj9OlUG1ZrjAp2MV1Lw0OGfnCzKoyi0gGWOtI8TmoIv/idBvhzatqP6JYDmAukmLP d5TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EocfWVinAZ+F976GEniBwDURWLY4foy5eH3zWSgeoCU=; b=Igw6QbJZFYvECJ4N6aWlXlJnwe1IdlbLM9PiTkZuEBMGKr9MNAcNrJI4LGZ6YPp1oV 7jGYU6d3mTQVy4SrtYjcGmlHOyOeqi1+oPSMP8VONnZZFnOuOboS0dcCNumfEboJq0ip a2F6cs2yZV1E18tv0KHZ76ZYiK5GW9oDT2ut39/lWfN1PCM5G3zFbh0ugZvaO3bqLuuo voadu2+7pB1G0Whod/mWas0TdYIl9C3zWMj3DtwISbdQ1OrqMCIKXgYqbjMjbI3bCqLS Ncmz8pHUcMYr3Zq3K680U/DJhEraPyQcllzxyQBirgLCMPAdQoXDcVhE7hRkt4ottlS8 BZJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch11si869325edb.384.2020.12.02.03.46.11; Wed, 02 Dec 2020 03:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729663AbgLBLom (ORCPT + 99 others); Wed, 2 Dec 2020 06:44:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:33744 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726472AbgLBLom (ORCPT ); Wed, 2 Dec 2020 06:44:42 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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