From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 27553421896 for ; Tue, 16 Jun 2026 09:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781602663; cv=none; b=mR177udn+MuNH2JlKS0CigGMoPT1HMdgwMH5vP4s4TKQVtu/SnOkpNnQLY8I87dd0e5zwoGnaKQCqne2hXVeyjksNjb0rZP2yxsm4ZOBhqlHgdONW/I0qVei7wwYpgI7kpBB34Fd4RQledj7DebCF3wWmnBMvBRr9b8Ox5EsICc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781602663; c=relaxed/simple; bh=y9p9xoSTkXtmUF2M00lc0iXntzO4bjfCBhF7gVsV9FA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=duhsefDNxBGdZ0Uqu+DPcIAI2NJZ+f+AVIKLtp6eXxtshXhdlLGeYB5zqRi8bGHAih1f6l0NQCWbh0bqm7UH/YhZrUkpeiJxnprA4IAA34ZIQ+2EL6ZK9wXxAr0aVbE8Jfj/VNR8noxiFdAHD4yG2Vkws8UkSN0dsSjDpdisCwU= 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=NBSlMrWM; arc=none smtp.client-ip=90.155.92.199 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="NBSlMrWM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=vpKQtN/q00ml5BE5VcjJqxy3vl1MAvoC0ha/7TukLHs=; b=NBSlMrWMkT9/fdjBAegNzRcHUH BeVnSyMJKJJ/LuqsQe0nClW+S+tgFyefJo0pgcEB+awsWLOxxF1TB+95kp65V22Kf+HSwoe0A19JS ZwFHC3Phmn8kKURhMjcEn4qXkV6QiUmkO7J06aosvDrurTSeIZztfL/26tkWa5/GFMBu5QQVb6xqu mPbI1Y4hWntU3M41cB6CD2SMXdWDOrFQ8uuTfLQu9YIP/5KX+BMgMw+PzYZfuOKQSbJ5XVSm54DDz UbYTYbS8ljzSX9IsoveaZxzKhddtrCNHh0rRLd0jeqK1d0JjyPCu+rcVNdunQfUnhfiVvl3kAZ8ix iGt6b5BQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.2 #2 (Red Hat Linux)) id 1wZQEf-0000000AgDM-2yir; Tue, 16 Jun 2026 09:37:34 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id CDDBD30036F; Tue, 16 Jun 2026 11:37:32 +0200 (CEST) Date: Tue, 16 Jun 2026 11:37:32 +0200 From: Peter Zijlstra To: Vincent Guittot Cc: mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org, qyousef@layalina.io Subject: Re: [PATCH 3/6 v2] sched/eevdf: Update slice protection even when resched is already set Message-ID: <20260616093732.GI42921@noisy.programming.kicks-ass.net> References: <20260615162420.420957-1-vincent.guittot@linaro.org> <20260615162420.420957-4-vincent.guittot@linaro.org> 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: <20260615162420.420957-4-vincent.guittot@linaro.org> On Mon, Jun 15, 2026 at 06:24:17PM +0200, Vincent Guittot wrote: > Even if resched is already set, we might want to update or even cancel > the slice protection and ensure that the newly waking task will be the > next one to run. > > Signed-off-by: Vincent Guittot > --- > kernel/sched/fair.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index b8d5d9bcc014..b98d67650a98 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9805,7 +9805,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f > * prevents us from potentially nominating it as a false LAST_BUDDY > * below. > */ > - if (test_tsk_need_resched(rq->curr)) > + if (!sched_feat(PREEMPT_SHORT) && test_tsk_need_resched(rq->curr)) > return; > > if (!sched_feat(WAKEUP_PREEMPTION)) Fair enough. It did get me thinking about what we would want for SCHED_BATCH tasks. I think we might want to make that RUN_TO_PARITY check (which selects min_slice) conditional on normal_policy(). But that's another patch for another day (and much easier after we land that flat thing).