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 686F530EF80 for ; Fri, 1 May 2026 18:59:20 +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=1777661965; cv=none; b=ZHdMf+/BndEbkLgpjOnGGfekpCXmxPwL+PWzq63Q+dIHkChjlI+edZGcvZhY7kvWuvTHR/UM57iHvGQfE2gB4NGgx/1u27w9pt+aMo0IgF38PyPLWlayMKjh2ginBvonCvzA4cK7IWZMSmuqIj4bvaLCntlfqnAGDfcE6RsSfo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777661965; c=relaxed/simple; bh=fc818uqxd1v8ZOnNNIp9rPKwLE2WZzkACdU1ez4zt8c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sA/3y5ujaRup9CLfZkIyuLO5cW3QMbOn6Vwdq+FjLZ7QozFfGdNuLmFO/VdyrbISxvELxV8Tm7BRo05upVdwefrc3JSJTlV/ztL4j36cp8POVSQLS/4XcIQsKkg6GKLhLIVP2NVbXcjmO4JUDg4h6gsaAWbRf3RJ43TJPtGEOdM= 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=h+8v84xf; 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="h+8v84xf" 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=GNygzJWO+g72DhDICFfGLfw04kXQx1wm8G1lWyzybxE=; b=h+8v84xfMtwmcxrpgYHtKqVbud Es0GU1JbVy7LrbAkfby4sID4b2H7Xg9n1o80v1R+2Q9GHFzYU3BoIDHn1kuLGSy926cyd3Ak/PoT8 G347gD2xjAtm4LNjnH9/mOxxUYdorMHXkSdIoUBxD+6XBffZhRBnrs7qJoVoXR7R76vWHsNvKtQcY SnbekA2lCq1revGzbtQ9YCjh3EZI1NiszJMD+EAXxepIIS7m9XIXdZjBMvatzh1A9Y571sYb8W/PV T8wyEF+j/kVsl+PjFFeloGrR+8hTj7+eJJRJwuEkYiMA6zsR/dzyHvmrQ4F+548CVvJgz+dAN2sSx IMchTOTA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1wIt4n-00000009CQS-3dqq; Fri, 01 May 2026 18:59:01 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 565293008E2; Fri, 01 May 2026 20:59:00 +0200 (CEST) Date: Fri, 1 May 2026 20:59:00 +0200 From: Peter Zijlstra To: K Prateek Nayak Cc: John Stultz , LKML , Vineeth Pillai , Sonam Sanju , Sean Christopherson , Kunwu Chan , Tejun Heo , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , kernel-team@android.com Subject: Re: [PATCH v2 1/2] sched: proxy-exec: Close race causing workqueue work being delayed Message-ID: <20260501185900.GF1026330@noisy.programming.kicks-ass.net> References: <20260430215103.2978955-1-jstultz@google.com> <20260430215103.2978955-2-jstultz@google.com> <20260501132143.GC1026330@noisy.programming.kicks-ass.net> <63c830c3-fe6d-4822-81db-9fdd1597282e@amd.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=us-ascii Content-Disposition: inline In-Reply-To: <63c830c3-fe6d-4822-81db-9fdd1597282e@amd.com> On Fri, May 01, 2026 at 09:25:29PM +0530, K Prateek Nayak wrote: > > @@ -3685,6 +3691,7 @@ ttwu_stat(struct task_struct *p, int cpu, int wake_flags) > > */ > > static inline void ttwu_do_wakeup(struct task_struct *p) > > { > > + p->is_blocked = 0; > > I don't think it is this simple at the moment because the proxy bits in > __schedule() still have to handle PROXY_WAKING and once we clear it here > task will no longer go through proxy_needs_return() path. > > Clearing of ->is_blocked has to be done at the same point where > ->blocked_on is cleared although they are set separately. Argh. Its all a convoluted mess. AFAICT this all goes away when we make ttwu() do the return migration properly. And then it does work. So we're now in the situation that things are a bit of a mess, and we need to make a bigger mess, only to then instantly remove it all again when we clean up :/ Can't we simply mark PROXY_EXEc broken for a cycle? Its not like the upstream version has been very functional anyway.