From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D15A331355C for ; Wed, 28 Jan 2026 11:11:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769598674; cv=none; b=U1//rXRhoKFkuoFeKAWpiK/u7wVg2ucvfszCStyR4Nx5rrEH0FkW3geaym9zQ4Pd+oVGkGQClSaIJ/DognX5Bti54Xq4sxDPsqe2Mms/EMVi+NvVTCPGtbSSycflM7i/jVtJQVjCBzf/fgaxu0gGK6YBKOcf40Ps2hhLc2F7Q9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769598674; c=relaxed/simple; bh=C+SmWdKWjVOL5Tb63Jx9lHQe0bjn7dJPQat6cQgr7oo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=KlelmvFuz4DVv7aDMtGRg0QTiFMEKnT9j13xm3jKVh76xwwSNhHE1L2jdGGd+dpW7k+x3aJpqqthB1ZtT4HHruaUtufTduhgOuFIE1DTczrsfEZMLvhrhSb3v+x7O1q1SgfWK43uVrZXFTKBGUTbrQSMPqwvb0ps/g4foH2zvd8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dFnbod8q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dFnbod8q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B55DC4CEF1; Wed, 28 Jan 2026 11:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769598674; bh=C+SmWdKWjVOL5Tb63Jx9lHQe0bjn7dJPQat6cQgr7oo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dFnbod8qFucnSAP5oOjC65ewU0CJNZoQkq53snwYVQifGaQL/U5ilMGFoXGzlZ9l2 VpiDrW323TACBCPkaXIvWZHNAfUI/Lk4lhTzOE6Cq/ff3P8JL1mpu3opp0PmgTpiCL P0a4T7zcdRAK3gyw31CoUP7aO0uHqJMIvVov/Nk02m7mAbvQnuAF9sqPgYQLaZ2W2q YY87/vuHxpjygM4UJG451xREb0ZMzqHkHLQzRtUQSEU8xITcwVB6hiFBD7izbZDbT1 HtYIb4rNCRIWYlDDQGNlWMBkDG+Q0fzNxLiJFpfA1+Z0JgE72M9HLqHrwOI8OgP7ra zT2QBX1voXyBw== From: Thomas Gleixner To: Zhan Xusheng Cc: linux-kernel@vger.kernel.org, linux-irq@vger.kernel.org, Zhan Xusheng Subject: Re: [PATCH v3 1/2] genirq/matrix: Clarify CPU selection logic In-Reply-To: <20260128031406.9473-2-zhanxusheng@xiaomi.com> References: <87wm13bgd8.ffs@tglx> <20260128031406.9473-1-zhanxusheng@xiaomi.com> <20260128031406.9473-2-zhanxusheng@xiaomi.com> Date: Wed, 28 Jan 2026 12:11:11 +0100 Message-ID: <87cy2u9els.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Jan 28 2026 at 11:14, Zhan Xusheng wrote: > The CPU selection loops in matrix_find_best_cpu() and > matrix_find_best_cpu_managed() mix the online check with the > comparison that determines whether a CPU becomes the current > best candidate. What's wrong about that? > Restructure the loops to filter out offline CPUs first and then > perform the comparison separately. This makes the selection > criteria easier to read and reason about. It's just different and not any better. We are not reshuffling perfectly correct code just to accomodate with personal taste of someone. Thanks, tglx