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 9A21F1EF091 for ; Tue, 5 May 2026 13:04:16 +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=1777986260; cv=none; b=Lh6+CAQzHGhu1CpPy3sOHNrBHt8olHY/fbCJA4K167bHgQhEKtEvBn7WpDkJwre6ByY1VibvG39F/dLmm/9fh5TPaWDfbRAoS1LDyj9St1FYSRgqHaSRuURidT4jrt+cdj6XIbPsyc4aWt4b4tAUtgju1I0M2mlotkRoTfmPnGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777986260; c=relaxed/simple; bh=CFj4Ch82bJ0OtwjkmO1wXh1e2BtzQFQvYCMrRs6tIrw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BIPLBXnL8MQ1YQBfQ1a7n5AXZf46lUSJIM1UDAzoHPtGlREGv9bl8AWkFVCWRYvX8aEaCDeWvZXouyRL5ANubGqKWcC2BHUI0TnZ3SFhZhfdN4wpK8rJu8is47H6X1oSwDMP/jx2l5vCSRu23jig83sBO23ivSjQJ8UlPm74iys= 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=Pdlo0Lek; 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=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="Pdlo0Lek" 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=hXykG2r6wq9FzSxfGzlVU8cAZmZyjhI+NMizxY62So8=; b=Pdlo0Lek5KxyRvtPxRcxYXx8+J Bm+ddnupAlnZg6hcxVHmoa0w0NS+r8UttPgH00Yrkp1bujHP9O41FP0YBLDobHfK0ngD62/YnFufz gyCObIlOdM45fUmkfC/mRM3HG1voQeTKyHi/Dk3LffykIUyIrzL/UMB73/c9atQlXf7HjF9GFV81B 09acqIUxIGvX1xz4J/jfF1rEbJMbgGYuPJMnV8sBhB3kdL0/AzI0uUd+TTxvaAPny7xhSrazgjl5d FQAqRTzn9RujX2RxJb7nUvhvWxwg7RARJEO8r8AVhB/ETTxuElgaKBADbhUkD7bx016h5zMvWnPu1 3D8r4mUg==; 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.98.2 #2 (Red Hat Linux)) id 1wKFRX-0000000Daag-3gpn; Tue, 05 May 2026 13:04:08 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8B6CC3001AC; Tue, 05 May 2026 15:04:05 +0200 (CEST) Date: Tue, 5 May 2026 15:04:05 +0200 From: Peter Zijlstra To: Yuri Andriaccio Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org, Luca Abeni , Yuri Andriaccio Subject: Re: [RFC PATCH v5 13/29] sched/rt: Implement dl-server operations for rt-cgroups Message-ID: <20260505130405.GM1026330@noisy.programming.kicks-ass.net> References: <20260430213835.62217-1-yurand2000@gmail.com> <20260430213835.62217-14-yurand2000@gmail.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: <20260430213835.62217-14-yurand2000@gmail.com> On Thu, Apr 30, 2026 at 11:38:17PM +0200, Yuri Andriaccio wrote: > +static struct sched_rt_entity *pick_next_rt_entity(struct rt_rq *rt_rq); > +static inline void set_next_task_rt(struct rq *rq, struct task_struct *p, bool first); > + > static struct task_struct *rt_server_pick(struct sched_dl_entity *dl_se, struct rq_flags *rf) > { > - return NULL; > + struct rt_rq *rt_rq = &dl_se->my_q->rt; > + struct rq *rq = rq_of_rt_rq(rt_rq); > + struct task_struct *p; > + > + if (!sched_rt_runnable(dl_se->my_q)) > + return NULL; > + > + p = rt_task_of(pick_next_rt_entity(rt_rq)); > + set_next_task_rt(rq, p, true); > + > + return p; > } set_next_task_rt() should not be needed at this point. There is only a single ->pick_next_task() implementation left, and that will soon go away too. All ->pick_task() methods are idempotent. [ https://lore.kernel.org/r/20260317104343.225156112@infradead.org ] Notably, see core.c:__pick_next_task(), it will take care of set_next_task() through put_prev_set_next_task() after calling class->pick_task().