From patchwork Fri Dec 4 09:15:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 11951167 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,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 9768BC433FE for ; Fri, 4 Dec 2020 09:16:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F05A2225AB for ; Fri, 4 Dec 2020 09:15:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F05A2225AB 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 597546B006E; Fri, 4 Dec 2020 04:15:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4FA4D6B0070; Fri, 4 Dec 2020 04:15:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39C3B6B0071; Fri, 4 Dec 2020 04:15:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 169E16B006E for ; Fri, 4 Dec 2020 04:15:58 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id D7A2C8249980 for ; Fri, 4 Dec 2020 09:15:57 +0000 (UTC) X-FDA: 77555042754.29.love22_3306994273c3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id B7FAB180868C1 for ; Fri, 4 Dec 2020 09:15:57 +0000 (UTC) X-HE-Tag: love22_3306994273c3 X-Filterd-Recvd-Size: 3198 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Dec 2020 09:15:56 +0000 (UTC) IronPort-SDR: zsQr2jPDg+CSTcmCgcNw3hSiaX/7uVVM7YJBzSLodfFb8QWbF2mUzoJ29IWnFtSHwRN46WZ1xE QPzL4iMbGpHw== X-IronPort-AV: E=McAfee;i="6000,8403,9824"; a="237467136" X-IronPort-AV: E=Sophos;i="5.78,392,1599548400"; d="scan'208";a="237467136" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2020 01:15:55 -0800 IronPort-SDR: mr3ZlqUTIVb4q01Y8bYFcGc7DlSPk1NYe3aLoAsL1ACoNptIQJPUbeYEwco8ur2IdZ1BRjhMfs rCdQc26eTcwQ== X-IronPort-AV: E=Sophos;i="5.78,392,1599548400"; d="scan'208";a="550879507" Received: from unknown (HELO yhuang6-mobl1.ccr.corp.intel.com) ([10.254.212.254]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2020 01:15:51 -0800 From: Huang Ying To: Peter Zijlstra , Mel Gorman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , "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: [PATCH -V7 2/3] NOT kernel/man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING Date: Fri, 4 Dec 2020 17:15:33 +0800 Message-Id: <20201204091534.72239-3-ying.huang@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201204091534.72239-1-ying.huang@intel.com> References: <20201204091534.72239-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" --- man2/set_mempolicy.2 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2 index 68011eecb..fb2e6fd96 100644 --- a/man2/set_mempolicy.2 +++ b/man2/set_mempolicy.2 @@ -113,6 +113,15 @@ 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)" +When +.I mode +is MPOL_BIND, enable the Linux kernel NUMA balancing for the task if +it is supported by kernel. +If the flag isn't supported by Linux kernel, or is used with +.I mode +other than MPOL_BIND, 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 +302,11 @@ 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 Linux kernel, or is used with +.I mode +other than MPOL_BIND. .TP .B ENOMEM Insufficient kernel memory was available.