From nobody Mon Jun 8 07:24:28 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 ECF1C3D9DA6; Thu, 4 Jun 2026 18:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780598743; cv=none; b=Q13NOeVZCfs4EmY4XzW8Fkmc89TnI07pPNB7d2XugkDBnH+7xnhUUrgKm23QKbInJyXa1iVw6u1/DZQ9Zqere55Dngn82Lpn88ho2rgowfYGsJfKhl5rzaCEHSx3Z44z6pw+nya24lvfYW7FqbOPRGER7JRqYvgQ4FwsG2DdOkQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780598743; c=relaxed/simple; bh=P34x5ElIgmAogxXiw2nVjP30tswcECz9IyzL2qOObV8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=s9vlG3yUE9hb6WLN9k4OGX9CwbibJ5xk53HUiJE12hpnkGmPAKLlF9f0OEB04mbJ24pg1/7lbqdvTzgRu7Zkqy3Bz2rmnFfwGJ26xTozDhUsDIUo4fs3Mc4i1HuSdCU0KrCYItrwu7wTjzBTunwzWASe6JnMp3rhQ3RoCmijhZw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=V3WHVyuW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=0QsbutQw; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="V3WHVyuW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0QsbutQw" Date: Thu, 04 Jun 2026 18:45:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780598740; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FHYydmb1KnyFBNFKoBOo6cKXEtof+74/52TOyucDEjQ=; b=V3WHVyuWLF+oxYwYay+gzpuKOEqkrTk9fXBIfqsQ5+/V62C8y/mvGaM/7djsc19fL6yW5a gHWNYVieOAsGy57UoPudkyrCV1kF6YHcKu2A3uzNpf0Q/cEzoXH097qhU5mh/R9PEkaGjX DIdofZLiYpzG/UrYcJijiPCZbXQrw2nYyU5c+oFCKjzfLUkvIWrJfTsJSi2PSeiOg+0UgK KwtkAoHWQKMnT9oZ6evzRqlS1CPtPyqNDuYQ8GblEFQ/bEAGUzjZHa37OIEWRKTz/RdHJo SUVjcyIdwlgHoDOQua8VHHI2VVzfY7rsQJWy5pH5XCg0KX5FUDdgxplG0FQrgQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780598740; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FHYydmb1KnyFBNFKoBOo6cKXEtof+74/52TOyucDEjQ=; b=0QsbutQwmmCPKA5P/CFNMdWAUWDPywRtPsD6Hlr+jfmMA84jUA4qncyWm28tqrE1Gty2mS st1X78NXC9B0pcAg== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/proxy: Switch proxy to use p->is_blocked Cc: K Prateek Nayak , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260526113322.477954312@infradead.org> References: <20260526113322.477954312@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178059873923.710.845123839287993388.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: be365ce2bc20b8970bed350f82c3b760256b6945 Gitweb: https://git.kernel.org/tip/be365ce2bc20b8970bed350f82c3b7602= 56b6945 Author: Peter Zijlstra AuthorDate: Tue, 26 May 2026 11:42:29 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 02 Jun 2026 12:26:09 +02:00 sched/proxy: Switch proxy to use p->is_blocked Rather than gate the proxy paths with p->blocked_on, use p->is_blocked. This opens up the state: '->is_blocked && !->blocked_on' for future use. Notably, only proxy and delayed tasks can be ->on_rq && ->is_blocked, and i= t is guaranteed that sched_class::pick_task() will never return a delayed task. Therefore any task returned from pick_next_task() that has ->is_blocked set, must be a proxy task. Suggested-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260526113322.477954312%40infradead.org --- kernel/sched/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index b007b65..9b71031 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3764,7 +3764,7 @@ static inline void proxy_reset_donor(struct rq *rq) */ static inline bool proxy_needs_return(struct rq *rq, struct task_struct *p) { - if (!task_is_blocked(p)) + if (!p->is_blocked) return false; =20 /* @@ -6866,14 +6866,14 @@ find_proxy_task(struct rq *rq, struct task_struct *= donor, struct rq_flags *rf) bool curr_in_chain =3D false; int this_cpu =3D cpu_of(rq); struct task_struct *p; - struct mutex *mutex; int owner_cpu; =20 /* Follow blocked_on chain. */ - for (p =3D donor; (mutex =3D p->blocked_on); p =3D owner) { + for (p =3D donor; p->is_blocked; p =3D owner) { /* if its PROXY_WAKING, do return migration or run if current */ - if (mutex =3D=3D PROXY_WAKING) { - clear_task_blocked_on(p, PROXY_WAKING); + struct mutex *mutex =3D p->blocked_on; + if (!mutex || mutex =3D=3D PROXY_WAKING) { + clear_task_blocked_on(p, mutex); if (task_current(rq, p)) { p->is_blocked =3D 0; return p; @@ -7147,7 +7147,7 @@ pick_again: =20 rq_set_donor(rq, next); next->blocked_donor =3D NULL; - if (unlikely(next->is_blocked && next->blocked_on)) { + if (unlikely(next->is_blocked)) { next =3D find_proxy_task(rq, next, &rf); if (!next) { zap_balance_callbacks(rq);