From patchwork Wed Jan 20 06:12:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 12031471 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=-16.8 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_GIT 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 EC505C433E6 for ; Wed, 20 Jan 2021 06:13:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6546B2313C for ; Wed, 20 Jan 2021 06:13:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6546B2313C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C0E5B6B0007; Wed, 20 Jan 2021 01:13:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B227A6B0008; Wed, 20 Jan 2021 01:13:28 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 979366B000A; Wed, 20 Jan 2021 01:13:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 7BD206B0007 for ; Wed, 20 Jan 2021 01:13:28 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 42FEA180AD80F for ; Wed, 20 Jan 2021 06:13:28 +0000 (UTC) X-FDA: 77725136496.30.loss06_51154b227558 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 249F3180B3C8E for ; Wed, 20 Jan 2021 06:13:28 +0000 (UTC) X-HE-Tag: loss06_51154b227558 X-Filterd-Recvd-Size: 2827 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 Jan 2021 06:13:27 +0000 (UTC) IronPort-SDR: 0iWnhP1JJAU9RJSKlzgBUduHobtX5lDkkixbzFGDUDACzu3kcLW7KUfgKgO6TwxVOje8CQ3pXb jUU9xNDTsV3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9869"; a="158826024" X-IronPort-AV: E=Sophos;i="5.79,360,1602572400"; d="scan'208";a="158826024" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 22:13:26 -0800 IronPort-SDR: 8IqeVCpowqrbAPYEc0RVr7R4ZhSfJiIfcxEihoIM1srisFo0e7PZk2oEcI14l52oQ8TpsSZdpZ oTbwVEzlx2zQ== X-IronPort-AV: E=Sophos;i="5.79,360,1602572400"; d="scan'208";a="384449328" Received: from yhuang6-mobl1.sh.intel.com ([10.238.6.89]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 22:13:24 -0800 From: Huang Ying To: Andrew Morton , Mel Gorman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , "Alejandro Colomar" Subject: [PATCH -V9 2/3] NOT kernel/man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING Date: Wed, 20 Jan 2021 14:12:34 +0800 Message-Id: <20210120061235.148637-3-ying.huang@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210120061235.148637-1-ying.huang@intel.com> References: <20210120061235.148637-1-ying.huang@intel.com> MIME-Version: 1.0 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: Signed-off-by: "Huang, Ying" Cc: "Alejandro Colomar" --- man2/set_mempolicy.2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2 index 68011eecb..fa64a1820 100644 --- a/man2/set_mempolicy.2 +++ b/man2/set_mempolicy.2 @@ -113,6 +113,22 @@ 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.12)" +When +.I mode +is +.BR MPOL_BIND , +enable the kernel NUMA balancing for the task if it is supported by +the kernel. +If the flag isn't supported by the kernel, or is used with +.I mode +other than +.BR MPOL_BIND , +return \-1 and +.I errno +is set to +.BR EINVAL . .PP .I nodemask points to a bit mask of node IDs that contains up to @@ -293,6 +309,12 @@ argument specified both .B MPOL_F_STATIC_NODES and .BR MPOL_F_RELATIVE_NODES . +Or, the +.B MPOL_F_NUMA_BALANCING +isn't supported by the kernel, or is used with +.I mode +other than +.BR MPOL_BIND . .TP .B ENOMEM Insufficient kernel memory was available.