From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 273E63546C0 for ; Sat, 1 Aug 2026 06:43:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785566632; cv=none; b=eD46ikP2TiGEtCvSZPQ93tn1A+00XTsF7c6M6/g6Rf5AaBeFKvWAkdzOHdIOqk/fyaKp65mw9JMkf4R4iq9PMlHPEobWl6PmpM+QZSLS/OwfoZrgiXwCuMeRNqrhgMxkvuBvBfWQ4y6+i6rU+13G3ckw64ndD0KD2mLTQ5t46ro= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785566632; c=relaxed/simple; bh=IcwVrOBFPQI3NFoZfHO67/5vh9COUfkvBLlWDt2cbRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eTDQAsBy4eOhUJbWiFlD1BGO3ackyTqiwwqTXxntt6QH6fr1wtfX9EhugoVFM03q9r9D67tnmhgZrSxkHV3OOi83X0l+Obfw89oOJlw4s7IlB9kGYrOYl5LgMl2XrCK4W5uedF+wD0CrH+Hb9LAx+XG6mf0yV/pRyP246O38rVs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HXvzblaJ; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HXvzblaJ" Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-38101f85591so2190089a91.1 for ; Fri, 31 Jul 2026 23:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785566630; x=1786171430; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=IcwVrOBFPQI3NFoZfHO67/5vh9COUfkvBLlWDt2cbRY=; b=HXvzblaJ8y/tiYOdkJJrebI5NKQwTyWRi6jqj6ezVO24VQx3ey6Ev2pEA9K+lU+B0m onySB784WxIYWMylsBI/Za25LCl40mjd8F4JrrvngqnJJSeNS/kdJfbtTZl8+NatIqLR gWuejUkmIbkpv99F23vO1XO1JxnvCzYxZmZsRbjdlH2PPd1MQBI5KP4dqtp1TKTpqM3/ aB1fXqUPoaMfDFmFqnRX8jj/S5UfzP7Jo9lVJkztWofLXKEBJmZitWKFeShzn7jxblMj idlUcKaqRFfODQCojBBrs0Qj6eq1ITGZ5qB4Oi+W+bwicEY9T/IUMp2pnbvnVZgtCORg AOLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785566630; x=1786171430; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=IcwVrOBFPQI3NFoZfHO67/5vh9COUfkvBLlWDt2cbRY=; b=U+E/zlQweuWmCbcxmBpE3UtEefiLAnWgG1lK+halRTWNrl3kZVlvRD7sqalAgG2vXp 7efX9HJim2qg+C5+hQzdkpYzM4QK6XZqzFewEKWmhr9xiSmks11wNfUHy2M0ABs5SdwA sSVwOLdrLgUXP3aNNkkcohzHC9g4aRBoso4oYW6l5C4RXkwl53QiubE7QGzxNiMm1OFS 9mUmT1ZAtmJIJ+8dm//2u01oMRZwXTKU0b89VN3reIcCOkKRFHdGRbMXS2MjVazg8b+p /WluUfX7++3qgCLqKnm0AYxor1RqKsyyEIkB3il5aq/XWYZIsBCZy3wktdhgLNPO2WZP fPcw== X-Gm-Message-State: AOJu0YyqhEPUYTpQht2KGnWPhv8pO1O5LoaRETVPZP/EyC8FVA8GCOtW akqsQfftlEccbxocKnUKtmGUsauW2PpgIqeh6SwIiIpedz+iD4TOKGsn X-Gm-Gg: AR+sD12/NF8ajPh779pH9pq5w7Bjl6nmenYH6blKBQI6SL//0lIjRM1GYyltDr0VcKr pDwE2FAoA4Sonl3ocuKyFHGXMRFaVBw+79+91H9vVG/fZQ7MRvu/qkZWFPTvLgng90+gkICTl+i 1eXZwlWqji8pny2PCfrxcAIGvang+BmGY9zIzfefhhu4ZNfFDu4naByMniGXq6dopxcU3MRVgIy ejDMAPLfCRztVCG7ZJADH+QsWJ2ujkkE1UUj8/xpWeElUidjYkgTSkQ5Y+5jg7LbK2tsuwh3i7o VpM0bSdhKF2q/3+s3ndrXf9H7HsBA3qlgY0M0DptWGKWbqyo6W3Qra5NKfDFitTRuVcH1LWWn+n mtwln8DuAhNJ4/eKFnkzM9HuTJO5XZxpEVX3Zpmxer+SD0Biu4upYZ4lI7M3EI9/wwDKvM82iFp N2gSa8wJ6F6u+qAjl2DXB7Nvkmm1IwXCIdVRUpgS0VDr57CXAlgtPQlY0seSd208QIn5EcpJwu X-Received: by 2002:a17:90b:2549:b0:38e:42f5:d096 with SMTP id 98e67ed59e1d1-38fbc8cbbefmr1794814a91.0.1785566630406; Fri, 31 Jul 2026 23:43:50 -0700 (PDT) Received: from osman.mioffice.cn ([43.224.245.178]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38fb29ca477sm1614375a91.8.2026.07.31.23.43.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2026 23:43:49 -0700 (PDT) From: Zhan Xusheng X-Google-Original-From: Zhan Xusheng To: vineethr@linux.ibm.com, 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, kprateek.nayak@amd.com Cc: linux-kernel@vger.kernel.org, sh@gentwo.org, zhanxusheng@xiaomi.com, Zhan Xusheng Subject: Re: [PATCH] sched/fair: Let sync wakeups target the waker's core Date: Sat, 1 Aug 2026 14:43:42 +0800 Message-ID: <20260801063500.512377-1-zhanxusheng1024@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260801035532.260625-1-vineethr@linux.ibm.com> References: <20260801035532.260625-1-vineethr@linux.ibm.com> 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-Transfer-Encoding: quoted-printable From: Zhan Xusheng =0D On Sat, Aug 01, 2026 at 09:25:32AM +0530, Madadi Vineeth Reddy wrote:=0D > Pass the waker's CPU down to select_idle_core() in that case and let it=0D > count as idle. The waker's core then remains an idle-core candidate and=0D > the wakee is placed on one of its sibling threads.=0D =0D Nice, and thanks for laying out the other approaches in the changelog.=0D =0D If I read select_idle_cpu() right, which sibling the wakee actually lands=0D on depends on the wrap scan order: it iterates=0D for_each_cpu_wrap(cpu, cpus, target + 1) and select_idle_core() returns the= =0D first fully-idle core it hits.=0D =0D On POWER SMT8 the SMT siblings are numbered contiguously, so the waker's=0D sibling sits right at target + 1 and is reached first - exactly the intent.= =0D =0D On layouts where the siblings are not adjacent to the waker - e.g. the=0D common x86 enumeration where the sibling is at cpu + nr_cores rather than=0D cpu + 1 - the scan visits other cores first, and if any of them is fully=0D idle it returns that (cold) core before ever reaching the waker's sibling.= =0D There the cache-sharing win would not materialise; the wakee lands where=0D plain SIS would have put it. It should not regress, but the benefit looks=0D like it could be largely specific to contiguously numbered SMT.=0D =0D Would you be able to share x86 / arm64 SMT2 numbers? That would help show=0D whether the waker's sibling actually gets picked on those layouts, or=0D whether the effect is mostly seen on contiguously numbered SMT.=0D =0D Thanks,=0D Zhan Xusheng=0D