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 5D35536B07B for ; Fri, 22 May 2026 11:35:57 +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=1779449759; cv=none; b=a4mwC8TxALwpESPtzRNtRtYzd7OYG4SQgNpVJuJJcOqWS6sDVy7DVF5aowXyjmTIxf+qTSveHbBXTmON+0GIkBoBAeyNzERp6T4bYJ5OiRBIGkplaOUykk29oBf/l27obOffohqnj2fd6qiyC3b3kPmuUfuQCxnG/P9a0bVE8Wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779449759; c=relaxed/simple; bh=sDA2gKY69L6rSjosVTvQDvNoyV7S6zof28kXe14eirQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RJexX8MAasdgjR2oDto1OTchnep3vHGmM/LMbVOmAk4ZN7bKEDdkI2IV23BiokAPPAbEuj+NQ6F7A3SfLWGjOtfjDfWSOFXRTJMXpDMoLUkbaqimoZI84oLBco8hq5zjTLPBJcwhOHTouNidiyEgs4zDCM4MM720thdG8OcW0LA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (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=CftQjaEo; 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=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="CftQjaEo" 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=YgCmfqbvNdoQzkN4k8AWUlNuAGeX5dDUZYSIJ5JidL8=; b=CftQjaEoiKHkVVPhOoVYls26rI k2lxtuuFrvf9P89P/TtPcwZbeQztdRmhEwtZAN0qYq9kTrxVnuQEysMHpUqROYo26CknHPKPxbkxS SXRFkMo4feHkBXaVfz54sIWnSW1uu7VS4SFfZzV/5DssXj2WQJe7BBkNelJ6Co5SYjoQ+qPWnmLle P0RJSGGVI50Rs098u/iFn0gM4fRY5XABjQWCB+/MWyNtOiJcvJqwTfloVaaRCdXuexRu0iEs0Igby u/viLnIX6OQGyvcwLIvOBOd6BjlF/ACVida5kukGBhw514ZGr1IDLQ6cO+zWG5aOCkgQyVszbWmW/ WrlbFflQ==; Received: from 2001-1c00-8d85-4b00-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:4b00:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wQOAM-0000000A1T9-35lS; Fri, 22 May 2026 11:35:46 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 45C90300446; Fri, 22 May 2026 13:35:46 +0200 (CEST) Date: Fri, 22 May 2026 13:35:46 +0200 From: Peter Zijlstra To: John Stultz Cc: LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , K Prateek Nayak , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , kernel-team@android.com Subject: Re: [PATCH v29 5/9] sched: Have try_to_wake_up() handle return-migration for PROXY_WAKING case Message-ID: <20260522113546.GU3102924@noisy.programming.kicks-ass.net> References: <20260512025635.2840817-1-jstultz@google.com> <20260512025635.2840817-6-jstultz@google.com> <20260522113054.GO3126523@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=us-ascii Content-Disposition: inline In-Reply-To: <20260522113054.GO3126523@noisy.programming.kicks-ass.net> On Fri, May 22, 2026 at 01:30:55PM +0200, Peter Zijlstra wrote: > On Tue, May 12, 2026 at 02:56:15AM +0000, John Stultz wrote: > > > migrate_task: > > proxy_migrate_task(rq, rf, p, owner_cpu); > > @@ -7107,6 +7101,9 @@ static void __sched notrace __schedule(int sched_mode) > > if (sched_proxy_exec()) { > > struct task_struct *prev_donor = rq->donor; > > > > + if (!prev_state && prev->blocked_on) > > + clear_task_blocked_on(prev, NULL); > > + > > rq_set_donor(rq, next); > > if (unlikely(next->blocked_on)) { > > next = find_proxy_task(rq, next, &rf); > > This adds a @prev dereference, after you've just explained how we should > not use @prev after a lock break. Ah, n/m. It is only those prev that really were rq->donor. prev itself is in fact current and will have on_cpu set.