From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5CF2B1E573D for ; Tue, 7 Jan 2025 10:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736246922; cv=none; b=ti/z2LWYbIs2nKPcqyuInmnxSJ4QWz8xcD69S5ey7N/X4KuD39b38Y+vZUyeXxvqnfqWRHw6GCZW9qTlYvqehq+mQ1xeFRrntTHh7fWWazIv5jT/io/Nmcl74qZ69jitozzJdTaUSBTv3EgpZl3YwluXAWhQQKRTnTydike8Cgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736246922; c=relaxed/simple; bh=oV/n1zvIWXh9r3QR75vtExHx4rZlaMCXkRd4CIh9J5w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fpzLxaMsGo6RRd2YXtxolY7pzOg6WkRTUBeCBN2t9fU2OmfKLF3SYSrZpee2xpHBs7r3cbxd9xBxqDSX/yQM5DubRdmb20qW40TBypYLmf9pQJV5Y0KeJDo+CoyNQkIHDJ/fJR2IE3e7KocoFn8FpDk+y4139PEJ3yvyOG5j/lc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=BWPjdh2o; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none 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="BWPjdh2o" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=7u/PNTbCJ2TSozHcWkpSWdOwHl6MFHm7nnrJ/IGvntY=; b=BWPjdh2o8Awb4p1b2ZCjSEAxB6 zs4tOyyIejrc7farX46Tpgpe2OMKFjPQmwE/Cp+eLeTXr1LojNeTnzkwYvu+T5e6m535f0ICBSivL gEkrkB4ZEnFPR/TTWJ2GLblwC6aue7PJzyvCx2cQbV+V+VJVP5BPMPve0jwAmpCTB8gv9kw0VVqQY gE5X40hpEkue4EdR+Lvk/shtJLE6ANmY2XfzP4Zl2ZaqAPfOqYnnORXEeJjlMOivDLvfbmjmfrtw7 LgNN8bZtEhvA7dj/qvMC7+AQHQB2xLWTOLNhTVPrJ9Xy1T/baTfFavIVAkXpx54044asr7aOxUG8s VkJviYDg==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tV78L-000000097rY-27Hd; Tue, 07 Jan 2025 10:48:25 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id C7BFC30057A; Tue, 7 Jan 2025 11:48:24 +0100 (CET) Date: Tue, 7 Jan 2025 11:48:24 +0100 From: Peter Zijlstra To: Chuyi Zhou Cc: mingo@redhat.com, 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 Subject: Re: [PATCH v2 0/3] Take the scheduling domain into account in numa balancin Message-ID: <20250107104824.GL20870@noisy.programming.kicks-ass.net> References: <20250103065930.413464-1-zhouchuyi@bytedance.com> <20250103113617.GE22934@noisy.programming.kicks-ass.net> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Jan 03, 2025 at 08:40:18PM +0800, Chuyi Zhou wrote: > Hello Peter, > > 在 2025/1/3 19:36, Peter Zijlstra 写道: > > Your $subject and actual patches do not patch. > > > > Your subject suggests you're taking the scheduling domains into account > > for numa balancing, your actual patches are bunch of special case hacks > > that totally ignore the actual sched domains > > The subject is indeed inappropriate, but the issues mentioned in this > patchset still exist, right? > > - We should not consider isolated CPUs in numa_stats. > - We should not select isolated CPUs as candidate CPUs. > > The current patch handle the above cases with hacks because I thought this > kind of change is minimal to fix this issue. Perhaps you have a better > solution for this issue? If so, please let me know, and I am more than > willing to continue addressing this problem. I would much rather see you do what the subject claims :-) At the very least you should mask the whole thing against rq->rd->span if there is a rq->rd at all ofcourse. This is not just the iteration in update_numa_stats() but also the for_each_node_state() iteration. I'm not sure there's anything saner than: cpumask_intersects(rq->rd->span, cpumask_of_node(nid))