mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
To: Chuyi Zhou <zhouchuyi@bytedance.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, longman@redhat.com, riel@surriel.com,
	chengming.zhou@linux.dev, kprateek.nayak@amd.com,
	linux-kernel@vger.kernel.org,
	Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Subject: Re: [PATCH v2 1/3] sched/fair: Remove unused task_numa_migrate return value
Date: Sun, 5 Jan 2025 23:58:07 +0530	[thread overview]
Message-ID: <d6ef6cb3-fee6-4ab7-a2ed-33139295a3c5@linux.ibm.com> (raw)
In-Reply-To: <20250103065930.413464-2-zhouchuyi@bytedance.com>

Hi Chuyi Zhou,

On 03/01/25 12:29, Chuyi Zhou wrote:
> Initial NUMA Balancing implementation used the return value of
> task_numa_migrate() to retry NUMA Balancing in commit 6b9a7460b6ba
> ("sched/numa: Retry migration of tasks to CPU on a preferred node") however
> in the same series[1], Mel also included an optimization from Rik which
> retried NUMA Balancing periodically irrespective the return value from
> task_numa_migrate() in commit 2739d3eef3a9 ("sched/numa: Retry
> task_numa_migrate() periodically").

Maybe you can also add: 
Fixes: 2739d3eef3a9 ("sched/numa: Retry task_numa_migrate() periodically")
While it's not strictly required, it might be useful to include for context.
> 
> The return value of task_numa_migrate now is unused, remove it.

Yes, it's unused now.
Reviewed-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>

Thanks,
Madadi Vineeth Reddy

> 
> [1] https://lore.kernel.org/all/1381141781-10992-34-git-send-email-mgorman@suse.de/
> 
> Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
> Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
> ---
>  kernel/sched/fair.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index d5127d9beaea..f544012b9320 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2486,7 +2486,7 @@ static void task_numa_find_cpu(struct task_numa_env *env,
>  	}
>  }
>  
> -static int task_numa_migrate(struct task_struct *p)
> +static void task_numa_migrate(struct task_struct *p)
>  {
>  	struct task_numa_env env = {
>  		.p = p,
> @@ -2531,7 +2531,7 @@ static int task_numa_migrate(struct task_struct *p)
>  	 */
>  	if (unlikely(!sd)) {
>  		sched_setnuma(p, task_node(p));
> -		return -EINVAL;
> +		return;
>  	}
>  
>  	env.dst_nid = p->numa_preferred_nid;
> @@ -2600,7 +2600,7 @@ static int task_numa_migrate(struct task_struct *p)
>  	/* No better CPU than the current one was found. */
>  	if (env.best_cpu == -1) {
>  		trace_sched_stick_numa(p, env.src_cpu, NULL, -1);
> -		return -EAGAIN;
> +		return;
>  	}
>  
>  	best_rq = cpu_rq(env.best_cpu);
> @@ -2609,7 +2609,7 @@ static int task_numa_migrate(struct task_struct *p)
>  		WRITE_ONCE(best_rq->numa_migrate_on, 0);
>  		if (ret != 0)
>  			trace_sched_stick_numa(p, env.src_cpu, NULL, env.best_cpu);
> -		return ret;
> +		return;
>  	}
>  
>  	ret = migrate_swap(p, env.best_task, env.best_cpu, env.src_cpu);
> @@ -2618,7 +2618,6 @@ static int task_numa_migrate(struct task_struct *p)
>  	if (ret != 0)
>  		trace_sched_stick_numa(p, env.src_cpu, env.best_task, env.best_cpu);
>  	put_task_struct(env.best_task);
> -	return ret;
>  }
>  
>  /* Attempt to migrate a task to a CPU on the preferred node. */


  reply	other threads:[~2025-01-05 18:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03  6:59 [PATCH v2 0/3] Take the scheduling domain into account in numa balancin Chuyi Zhou
2025-01-03  6:59 ` [PATCH v2 1/3] sched/fair: Remove unused task_numa_migrate return value Chuyi Zhou
2025-01-05 18:28   ` Madadi Vineeth Reddy [this message]
2025-01-03  6:59 ` [PATCH v2 2/3] sched/fair: Ignore isolated cpus in update_numa_stat Chuyi Zhou
2025-01-05 18:52   ` Madadi Vineeth Reddy
2025-01-07 13:16     ` Chuyi Zhou
2025-01-07 18:30       ` Madadi Vineeth Reddy
2025-01-07 18:39   ` Waiman Long
2025-01-08 10:47     ` Chuyi Zhou
2025-01-03  6:59 ` [PATCH v2 3/3] sched/fair: Ensure select housekeeping cpus in task_numa_find_cpu Chuyi Zhou
2025-01-03 11:36 ` [PATCH v2 0/3] Take the scheduling domain into account in numa balancin Peter Zijlstra
2025-01-03 12:40   ` Chuyi Zhou
2025-01-07 10:48     ` Peter Zijlstra
2025-01-07 13:03       ` Chuyi Zhou

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=d6ef6cb3-fee6-4ab7-a2ed-33139295a3c5@linux.ibm.com \
    --to=vineethr@linux.ibm.com \
    --cc=20250103065930.413464-2-zhouchuyi@bytedance.com \
    --cc=bsegall@google.com \
    --cc=chengming.zhou@linux.dev \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=zhouchuyi@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

Powered by JetHome