From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C94539B960 for ; Mon, 3 Aug 2026 07:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785741027; cv=none; b=gStTCHGMZyZOVvc6OucP8xnU0/yx4TBjQKOcXTGDD+ccNpQSnmtf4ui1Skqs0EnM+q+WI/MgCQWH5/vu99DN/ARp805dEtlJ16nErpCypfEC3Q03UpT6g/0RxU86cvBRLT9W4kO+UVSl/YPl7sakj0lrzN06nxQClz8n4RTNA5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785741027; c=relaxed/simple; bh=CrduSb8BT1x/uinZ1fmO7sgyK8BtNwjEscJM0Bxhse0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oss2E/gPy+XXTYcyzlGJSZc+Wd/VeY5hzDzUYF+c/DCWzyhmEj2CLjKwpUrUOuuqVg2tx9ws2VNVSUlv0BCCgN+tMfiTFnK9eNK0egu/Qdgel7PXXL6PRBRIZzvK5EFK4pIRVYnn94q7zVf/BU3BDitmTErsgRVkbxSFr6LHWgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ullczyYS; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ullczyYS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JdpUmGwXqFrPRZ2nafOUh7QATJ4Xii6Eim4xidYmj9I=; b=ullczyYSezxDEKYUGxy4MaGljy U0qhIsM7MU0JuH8DZ0PokqyPJcdGznpVXCNcOm00m1XCGoTx+RHHzTRa1TdS0nj/QvO4LQsFUsOf8 hQWqMsAoHZousFnZuFqqya7EJ++CLFCrSC5NTBgfbqs+gOOyvsfuMVc8rVIFIQ7p7jbByr1KzY1O3 oSjy9eUkYGGAmCINxdmmSA0ogR2iQEYs0GRDhzo9lp4fNSGl4eV5EXJizvx5pTTudP/n9n2H6qsK3 w0y3ZOuFHo1nNaMaxEQksfxoP269ASyQ+CFj3fhdgnB1AZZJ1L9BUKBuwkhmGZ/O6Jv4wIuS+Uh4W lbpg6kVg==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wqmoR-00000008puv-1k9r; Mon, 03 Aug 2026 07:10:15 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id CAC4930045A; Mon, 03 Aug 2026 09:10:14 +0200 (CEST) Date: Mon, 3 Aug 2026 09:10:14 +0200 From: Peter Zijlstra To: Eric Kim , Mel Gorman Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, Binwon Song Subject: Re: [PATCH] sched/numa: Reset NUMA fault locality after scan period update Message-ID: <20260803071014.GW49951@noisy.programming.kicks-ass.net> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > Link: https://lore.kernel.org/all/20250404095354.311156-1-qlsdnjs236@chungbuk.ac.kr/ > Signed-off-by: Eric Kim > --- > 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?