From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 91568236437 for ; Mon, 19 Jan 2026 15:01:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768834902; cv=none; b=D2GP6GiVAiJAeusn1+IR//XW3kv/n1qyUzbbSqZ9XC6dM7giYtB348IKd6VScaPlFMtYVgK3lAmDp91mgFdcwPHBx7PVeuSt23ozwz955f2Vzzj6eZGKJDLHMl+nRlQA1seD3zp9JAAI70l3lbGYbTyeCWkpc5FKE0ayyWyxWVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768834902; c=relaxed/simple; bh=KbiuWqV6p4GlZgtBy1bupeehG/w8h689cOqlurlihrU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ikYEQbVH1oJfsCmAhvP0+57ubUmfaSARqj+oNO1bop2BBAmdtT3C20JqbdaPGU1hMZRMrM8nI+Kx3CTZ1d8qHGQzPyJtazDo6SKscybVv/b8uGUygL8jgSmidr8F/pe5flXzhnS/opyvZYI85ebMr8jhWBslUwE8gCpXzrehWzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=axDHNk4n; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=sTm1a+3u; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="axDHNk4n"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="sTm1a+3u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768834899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7Prd4QVzycXDdG0DD2QXu4QxnOIZMatVB+UhQ7zVCsA=; b=axDHNk4ntfRDqCuzxxHO0CvpnJzayMU9LgV4SsRDt771S/v3hMezc1efrR5IxDwFsy+CNA AskL05ZnXrojMqymUBvNJdXAYT6by25vvFD44Q90fmxFwQYh1pUoseivbykm2GuWwyAzhS 3ObMvR0JkNHCf74dLzb6C0q9h/lUvCU= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-428-iZTjDxzjO7-6I3h3rmZNYA-1; Mon, 19 Jan 2026 10:01:38 -0500 X-MC-Unique: iZTjDxzjO7-6I3h3rmZNYA-1 X-Mimecast-MFC-AGG-ID: iZTjDxzjO7-6I3h3rmZNYA_1768834897 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-47ee3dd7fc8so32488775e9.3 for ; Mon, 19 Jan 2026 07:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1768834897; x=1769439697; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7Prd4QVzycXDdG0DD2QXu4QxnOIZMatVB+UhQ7zVCsA=; b=sTm1a+3umsfuBprmN6N0RWevNNwTb2yEIJriB2HBtvcvnRGQbzNcBAKNgLllnbCSKC pjneZ49wIWdqJwjsjLz90ljMdgof2Kg/OsAiGHAhe4rgXunMaFffRrMkTwTD/o5SrxdF /2Jt8fBviZAflP4yTPF+htEoIGW7sqwD+P03h5vlivS+6jkO0XML4ucGZC161OcDZdvY VRcMKLi6GWSwS+MaWXcB9l1Xd64pWKBgJ+t+8CsxjH3qo2W6OC7wu+yF1n0sBUjxIjZC +Bn8ZAyr3v05uqZKn2BrE12hVmufM/LIC2VfZVFQDxu+3bLghYkj6XVrKcbdUof3Xq3m rKFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768834897; x=1769439697; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Prd4QVzycXDdG0DD2QXu4QxnOIZMatVB+UhQ7zVCsA=; b=kYbdlkwK3iwen2iCfr3mil6qe+2fXSuAAlmlJLzFio1lxKV7K33FVBvOEG8kLqDn35 AJAZG8WqmucgmwxBenVJljAUJ7DkSvRof12TafcTE/LtMEq/Sou0e0HBLVzwRzsVVhjn Y1VguOcOXcoEKfOzjNfI6L1cwpeKaoNMQCaVD3PzSJO/b0dyspB572y2RgEiMYxFCTRZ W55e9uKlfgsuTQ8ZJG+yC4KXik/LnRo/HOmo59maDPW5zti7DvwIGVD6l9rEESiwIWYO iGWaprNPMkFFiOPLzoU1iS91aYAqQcSjOdzWR6xKGBTwSMBtJpdRRKMM5cN7nhDRqJz5 5LQw== X-Forwarded-Encrypted: i=1; AJvYcCVyly3K+neJekUevNNDGU5jr6zsTJk1x7kn9/E5M5Aw0SzkMEZcXITAyfzuemzhyZHiVi4Kzg/0RH58vXQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyOPbz2vGVITYiC89ReQGML1mMuXS5BYzc4iy0c9yPpp50is/yl ANO6AIQD5rLmH6V308YB7ue72nVxbhQfC7CVJYwGYMLBGOVASeGIg8pm+m2XGpQlFNCR3SlRZ3c SrkEHsV/1E+IGZgXEOXIw3wITd9IP5eVBFojchrGK/znRHOGnXQRkd74/9gIAiFwtqQ== X-Gm-Gg: AY/fxX76xvovmuqB0iE3LvtPABfWlv/km8eIUHMZxzmFt01bSip/68+pXUiDcTVmXSl +xWF3fPZHmrNpts9YOiTq9sy5sZAXiaYnNiZnS1twjeU4BYMdAte0Hyad3tTiQrH5QrbpCvLETd /8nrN8tuoLZRcijgePs9l8fX0mQawgHpBCpAYYR+n3W+8dTU0vsslJytAp5nG1G+kNPmqjoRlBU L0aCoQWaW4lZy9pdAkQvVYasEy3971yEBvkPmqnbMih98qKr5fVMRnMfUWMqQzNc/emOzim24TX 5oMjk4n9oZwcwdIKiwmHatDtDlFND8cnfdgxrXYQ1ibZRh1hS2hmQzW9krmx0N5F9nLMjoPg9tk 0RGzfNWRA3KlZxn8wL0/H1IQo3O5ASumMdrn/YgFS X-Received: by 2002:a05:600c:4f41:b0:47d:586e:2fea with SMTP id 5b1f17b1804b1-4801ead10cemr147945155e9.15.1768834887433; Mon, 19 Jan 2026 07:01:27 -0800 (PST) X-Received: by 2002:a05:600c:4f41:b0:47d:586e:2fea with SMTP id 5b1f17b1804b1-4801ead10cemr147943675e9.15.1768834886515; Mon, 19 Jan 2026 07:01:26 -0800 (PST) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.129.40]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4801fe6190dsm84957145e9.6.2026.01.19.07.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jan 2026 07:01:25 -0800 (PST) Date: Mon, 19 Jan 2026 16:01:23 +0100 From: Juri Lelli To: Yuri Andriaccio Cc: Ingo Molnar , Peter Zijlstra , 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 v4 12/28] sched/rt: Implement dl-server operations for rt-cgroups. Message-ID: References: <20251201124205.11169-1-yurand2000@gmail.com> <20251201124205.11169-13-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: <20251201124205.11169-13-yurand2000@gmail.com> Hello, On 01/12/25 13:41, Yuri Andriaccio wrote: > - Implement rt_server_pick, the callback that deadline servers use to > pick a task to schedule. > - rt_server_pick(): pick the next runnable rt task and tell the > scheduler that it is going to be scheduled next. > > - Let enqueue/dequeue_task_rt function start/stop the attached deadline > server when the first/last task is enqueued/dequeued on a specific > rq/server. > > - Change update_curr_rt to perform a deadline server update if the > updated task is served by non-root group. > > - Update inc/dec_dl_tasks to account the number of active tasks in the > local runqueue for rt-cgroups servers, as their local runqueue is > different from the global runqueue, and thus when a rt-group server is > activated/deactivated, the number of served tasks' must be > added/removed. This uses nr_running to be compatible with future > dl-server interfaces. > > - Update inc/dec_rt_prio_smp to change a rq's cpupri only if the rt_rq > is the global runqueue, since cgroups are scheduled via their > dl-server priority. > > - Update inc/dec_rt_tasks to account for waking/sleeping tasks on the > global runqueue, when the task runs on the root cgroup, or its local > dl server is active. The accounting is not done when servers are > throttled, as they will add/sub the number of tasks running when they > get enqueued/dequeued. For rt cgroups, account for the number of active > tasks in the nr_running field of the local runqueue > (add/sub_nr_running), as this number is used when a dl server is > enqueued/dequeued. > > - Update set_task_rq to record the dl_rq, tracking which deadline > server manages a task. > > - Update set_task_rq to not use the parent field anymore, as it is > unused by this patchset's code. Remove the unused parent field from > sched_rt_entity. > > Co-developed-by: Alessio Balsini > Signed-off-by: Alessio Balsini > Co-developed-by: Andrea Parri > Signed-off-by: Andrea Parri > Co-developed-by: luca abeni > Signed-off-by: luca abeni > Signed-off-by: Yuri Andriaccio > --- ... > /* > @@ -725,6 +769,14 @@ enqueue_task_rt(struct rq *rq, struct task_struct *p, int flags) > check_schedstat_required(); > update_stats_wait_start_rt(rt_rq_of_se(rt_se), rt_se); > > + /* Task arriving in an idle group of tasks. */ > + if (IS_ENABLED(CONFIG_RT_GROUP_SCHED) && ^^^ Shall we be using rt_group_sched_enabled() here and elsewhere instead? Thanks, Juri