mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gang Li <ligang.bdlg@bytedance.com>
To: Peter Zijlstra <peterz@infradead.org>, Mel Gorman <mgorman@suse.de>
Cc: songmuchun@bytedance.com, zhengqi.arch@bytedance.com,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] sched/numa: add per-process numa_balancing
Date: Thu, 3 Mar 2022 10:40:48 +0800	[thread overview]
Message-ID: <b31b0c6b-4a97-e03a-0bc0-4bf17d2ed946@bytedance.com> (raw)
In-Reply-To: <20220224075227.27127-1-ligang.bdlg@bytedance.com>

Hi Peter Zijlstra,

On 2022/1/12 22:43, Peter Zijlstra wrote:
 >> Set per-process numa balancing:
 >> 	prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DISABLE); //disable
 >> 	prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_ENABLE);  //enable
 >> 	prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_DEFAULT); //follow global
 >
 > This seems to imply you can prctl(ENABLE) even if the global is
 > disabled, IOW sched_numa_balancing is off.

I have discussed the semantics of this API with Mel Gorman, we both
agree that we can prctl(ENABLE) even if the global is disabled.

On 2021/11/10 00:26, Mel Gorman wrote: [1]
 > For symmetry and consistency of the tuning. Either there is per-process
 > control or there is not. Right now, there is only the ability to turn
 > off NUMA balancing via prctl if globally enabled. There is no option to
 > turn NUMA balancing on for a single task if globally disabled.

On 11/18/21 4:58 PM, Mel Gorman wrote: [2]
 > On Thu, Nov 18, 2021 at 11:26:30AM +0800, Gang Li wrote:
 >> 3. prctl(PR_NUMA_BALANCING, PR_SET_NUMAB_ENABLE);  //enable
 >
 > If PR_SET_NUMAB_ENABLE enables numa balancing for a task when
 > kernel.numa_balancing == 0 instead of returning an error then sure.

[1] Link: https://lore.kernel.org/lkml/20211109162647.GY3891@suse.de/
[2] Link: https://lore.kernel.org/lkml/20211118085819.GD3301@suse.de/
-- 
Thanks
Gang Li


      reply	other threads:[~2022-03-03  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  7:52 Gang Li
2022-03-03  2:40 ` Gang Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b31b0c6b-4a97-e03a-0bc0-4bf17d2ed946@bytedance.com \
    --to=ligang.bdlg@bytedance.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=peterz@infradead.org \
    --cc=songmuchun@bytedance.com \
    --cc=zhengqi.arch@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®