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=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 9473BC433ED for ; Sun, 4 Apr 2021 20:08:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C3936136A for ; Sun, 4 Apr 2021 20:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbhDDUIT (ORCPT ); Sun, 4 Apr 2021 16:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbhDDUIT (ORCPT ); Sun, 4 Apr 2021 16:08:19 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B43CEC061756 for ; Sun, 4 Apr 2021 13:08:13 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id f8so6594924edd.11 for ; Sun, 04 Apr 2021 13:08:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=IHqXevkW8mXcQqqcCSXjOLlGrwL3u2Vswhn5TbWqvpM=; b=d7NcM4vsh9ZuNHBezlLWRr3zzo1S08QLjv8nUaLiGioZ7L3uGC4nRvw+zBMpl98HYF 0MR2upoXnIRP7diWwYX+IExZe3LVQWivjZ4jYvIpCZ2GsY9nmp5HyHGFTi0mGujUdKoH ZqaLNsYrJ/QbU0dn6y2/F/1T8WnNDgXHRtKlkEQ35qA9eJz4qdk/kC8T+GJ7UNjJQbKb eyBsNBktmhLTscZA6raOj8of/K8oJHllPBGmrdvFy3pfoqBcdDKBr6iap7rym3MMnR9G tlPSW5thmG4auDk+vA46upQGK6uME1pIg3hJY0kFLBVWOt155QkpnMt2YGXM1UddCywX QHEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=IHqXevkW8mXcQqqcCSXjOLlGrwL3u2Vswhn5TbWqvpM=; b=InFGBgxeknMb0Sebb3KIFIpaLCsq3hdBeMyHiz02mqYQErM3GsmAFZEVmslWh3otNH hyzM4ezs55PlYvjvECFWcsNcLjXSCJNjYrJ9hq8HZF9fj1KmO9klatlS8JTuPqelvi8t uJ9IWovmETMTxa1urOLf/I25nsLfosWYSu08FTUzD28tf0fpQ9P8WJinp2l4JRNj352H 3IgTxzui2VZdZuS5U8X4F5JGy3Iae0vKp0aNqC61NrWdwVfDxs4S2bgesxz5hGGGWteG YUQ35oFoaTSQCzAU85/ja7y0dEiiUgF01EuQJVfi4s33ABvOXnoF4LgBN7I6TbAn4S6X aQHw== X-Gm-Message-State: AOAM532HCNpZKw+9ejtPeM8xk2WfuSLs/LbnA+LTJmI+ww7Q06TX4x76 uYy/XUSRBUlcysBZPkS7S9Xffyv0M0g= X-Google-Smtp-Source: ABdhPJwQUU2Yudv9WdsJscW5CohJCIaocotcBFNfJMlJqeITHV4l40obhgJiEYAYgdhqKh76rjHSyw== X-Received: by 2002:a05:6402:4386:: with SMTP id o6mr29067375edc.307.1617566892101; Sun, 04 Apr 2021 13:08:12 -0700 (PDT) Received: from ?IPv6:2001:a61:2553:a401:cfc6:2039:a9ec:21ff? ([2001:a61:2553:a401:cfc6:2039:a9ec:21ff]) by smtp.gmail.com with ESMTPSA id fi11sm7116009ejb.73.2021.04.04.13.08.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 04 Apr 2021 13:08:11 -0700 (PDT) Cc: mtk.manpages@gmail.com, Huang Ying , linux-man@vger.kernel.org Subject: Re: [PATCH] man2/set_mempolicy.2: Add mode flag MPOL_F_NUMA_BALANCING To: Alejandro Colomar References: <20210319235717.28264-1-alx.manpages@gmail.com> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Sun, 4 Apr 2021 22:08:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210319235717.28264-1-alx.manpages@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-man@vger.kernel.org Hi Alex, On 3/20/21 12:57 AM, Alejandro Colomar wrote: > From: Huang Ying > > In Linux kernel 5.12, a new mode flag MPOL_F_NUMA_BALANCING is added > to set_mempolicy() to optimize the page placement among the NUMA nodes > with the NUMA balancing mechanism even if the memory of the > applications are bound with MPOL_BIND. This patch update the man page > for the new mode flag. > > Related kernel commits: > bda420b985054a3badafef23807c4b4fa38a3dff Thanks. Patch applied. Cheers, Michael > > Signed-off-by: "Huang, Ying" > Cc: "Michael Kerrisk" > [ alx: srcfix ] > Signed-off-by: Alejandro Colomar > --- > man2/set_mempolicy.2 | 33 +++++++++++++++++++++++++++------ > 1 file changed, 27 insertions(+), 6 deletions(-) > > diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2 > index 6e695fb13..746858720 100644 > --- a/man2/set_mempolicy.2 > +++ b/man2/set_mempolicy.2 > @@ -98,6 +98,27 @@ The supported > .I "mode flags" > are: > .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 , > +\-1 is returned and > +.I errno > +is set to > +.BR EINVAL . > +.TP > +.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)" > +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_STATIC_NODES " (since Linux 2.6.26)" > A nonempty > .I nodemask > @@ -107,12 +128,6 @@ Linux will not remap the > when the process moves to a different cpuset context, > nor when the set of nodes allowed by the process's > current cpuset context changes. > -.TP > -.BR MPOL_F_RELATIVE_NODES " (since Linux 2.6.26)" > -A nonempty > -.I nodemask > -specifies node IDs that are relative to the set of > -node IDs allowed by the process's current cpuset. > .PP > .I nodemask > points to a bit mask of node IDs that contains up to > @@ -293,6 +308,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. > -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/