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 D7553483BCF for ; Thu, 13 Aug 2026 14:40: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=1786632060; cv=none; b=gAa5sWP874x6pAwYQydNdGVr6SzYrHXhKx372bgU3cny+LwvRISfeUwEAvZMFckHX2LmVpT5GC2cTaQOF1bJdGe9SG/9JUFanwH5TcA3gGYQhWsAjWSij6Lt185DXshkvaGeHfe8clMASFnm4ML91/A2Hn79oZQvFGxt1JLZ7vs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786632060; c=relaxed/simple; bh=nc7m2O9iIQ1U3YbvqRKV5zaH7HRjt4g0ZG8lYr/LbOI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HgxijM3S/1C7oxpxQEGdvulmFRJeD58XlAEIR1saHpmxpxGdymneiDa3YEFybByOVOup3KBY8XGEn0W08fN7MbSBIvnUk5geQcaWo/u1PT4UvVk83+RDpCeFAi/5+Rrgbp/s5G0PIQnwlqeV94+VtKFcCQzMtsxVLCMvsjINAxQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=dpO7SH3E; 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=pass 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="dpO7SH3E" 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=DFUWjCtbczjEJ/LFzlr33IWE0VRo2Cu4W/7MCaa7eSc=; b=dpO7SH3Eg3I4oxwv0vV0WQZ1xd 9/8NraG76AIymrWkdD3hpNCsRbXRFFEd422GavjFx7ZszRIauodUPAi0Wuymoca6IbSC2eER+fcNK ayH9onAotL5ep1VWYE+yYab6v6sxO+L/RzYqxYs9lUdMhCv4rB6aHh2uLhhdbvlX5dbP5v+6H9cCm RJ/O/KdPT6h7J+nAWsKN7yuvtxIliMyu9KN3xGxmy7cdOd0HpsjJetBqiPGvdfbTpIRGru5jgnsvU C96AufnugdRtOJ8Mc3fh93mJ6CHUbxSAPfvQ+yHHl90woxiERCbkUSFwZGiFge3rs+w/mAo2qVCUR OeFUCVQw==; 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.99.1 #2 (Red Hat Linux)) id 1wuWbt-00000003jRY-1h0u; Thu, 13 Aug 2026 14:40:45 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 68F0F300382; Thu, 13 Aug 2026 16:40:39 +0200 (CEST) Date: Thu, 13 Aug 2026 16:40:39 +0200 From: Peter Zijlstra To: John Stultz Cc: LKML , Juri Lelli , Valentin Schneider , Connor O'Brien , Joel Fernandes , Qais Yousef , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Mel Gorman , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , K Prateek Nayak , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , Andrea Righi , kuyo chang , hupu , kernel-team@android.com Subject: Re: [RESEND][PATCH v31 8/9] sched: Add deactivated (sleeping) owner handling to find_proxy_task() Message-ID: <20260813144039.GQ776954@noisy.programming.kicks-ass.net> References: <20260807035232.1881495-1-jstultz@google.com> <20260807035232.1881495-9-jstultz@google.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: <20260807035232.1881495-9-jstultz@google.com> On Fri, Aug 07, 2026 at 03:52:14AM +0000, John Stultz wrote: > @@ -3903,13 +4137,19 @@ void sched_ttwu_pending(void *arg) > update_rq_clock(rq); > > llist_for_each_entry_safe(p, t, llist, wake_entry.llist) { > + int wake_flags; > if (WARN_ON_ONCE(p->on_cpu)) > smp_cond_load_acquire(&p->on_cpu, !VAL); > > if (WARN_ON_ONCE(task_cpu(p) != cpu_of(rq))) > set_task_cpu(p, cpu_of(rq)); > > - ttwu_do_activate(rq, p, p->sched_remote_wakeup ? WF_MIGRATED : 0, &rf); > + wake_flags = p->sched_remote_wakeup ? WF_MIGRATED : 0; > + ttwu_do_activate(rq, p, wake_flags, &rf); > + rq_unlock(rq, &rf); > + activate_blocked_waiters(rq, p, wake_flags); > + rq_lock(rq, &rf); > + update_rq_clock(rq); > } > > /* > @@ -4416,6 +4656,7 @@ int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags) > ttwu_queue(p, cpu, wake_flags); > } > out: > + activate_blocked_waiters(cpu_rq(task_cpu(p)), p, wake_flags); > if (success) > ttwu_stat(p, task_cpu(p), wake_flags); > I is confused again. This seems double. Every entry on the wake_list comes through ttwu() proper and will thus have passed through this latter hunk, no?