The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Eric Kim <seohyun.kim@outlook.kr>, Mel Gorman <mgorman@suse.de>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, linux-kernel@vger.kernel.org,
	Binwon Song <qlsdnjs236@chungbuk.ac.kr>
Subject: Re: [PATCH] sched/numa: Reset NUMA fault locality after scan period update
Date: Mon, 3 Aug 2026 09:10:14 +0200	[thread overview]
Message-ID: <20260803071014.GW49951@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <OS7PR01MB13914DA08AC588DE5544B03E796D62@OS7PR01MB13914.jpnprd01.prod.outlook.com>

On Sun, Aug 02, 2026 at 08:30:18PM +0900, Eric Kim wrote:
> When updating the task scan period for NUMA locality checks,
> update_task_scan_period should increase the scan periods
> either when there were no faults or when there is a failed migration
> attempt. However, numa_faults_locality which is used to check for
> migration failure and number of faults is not cleared when it is in
> this state, causing stale migration and fault information to affect
> later decisions.
> 
> clear numa_faults_locality after updating the scan period so that
> at each update it uses newly collected information.
> 
> Reported-by: Binwon Song <qlsdnjs236@chungbuk.ac.kr>
> Link: https://lore.kernel.org/all/20250404095354.311156-1-qlsdnjs236@chungbuk.ac.kr/
> Signed-off-by: Eric Kim <seohyun.kim@outlook.kr>
> ---
>  kernel/sched/fair.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index d78467ec6ee13..2ac1ef9ad63bd 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -3469,6 +3469,8 @@ static void update_task_scan_period(struct task_struct *p,
>  		p->mm->numa_next_scan = jiffies +
>  			msecs_to_jiffies(p->numa_scan_period);
>  
> +		memset(p->numa_faults_locality, 0,
> +		       sizeof(p->numa_faults_locality));
>  		return;
>  	}

Can/should we share core with the tail of this function?

  reply	other threads:[~2026-08-03  7:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02 11:30 [PATCH] sched/numa: Reset NUMA fault locality after scan period update Eric Kim
2026-08-03  7:10 ` Peter Zijlstra [this message]
2026-08-03  7:47   ` Eric Kim

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=20260803071014.GW49951@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=qlsdnjs236@chungbuk.ac.kr \
    --cc=seohyun.kim@outlook.kr \
    --cc=vincent.guittot@linaro.org \
    /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