From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 925F73B27DE for ; Thu, 30 Apr 2026 21:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777585151; cv=none; b=Kq86q8T5Yl4Lnq6OFgPfh6UVKVc+fjhjZ0GB2tFQCiSB2vI/3Na/fuU9z8ckHCD7ZpbEOtGfR5MUwlHJ12q/JpiAv+U5XpjLJdFUbfN51HTO0oImHMXPpe2Jqqu6/m2SzSzsMkfFkGjm6LmzRjXYFgYeEclD4sA23wziRNmwEkI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777585151; c=relaxed/simple; bh=vojUATYKeMem1v29qT/lhnaJyJsj2kwzocGZb7jO8Pk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IpI/T04W3wx7XQbVe1u/CodvlFRTatVZee7oCS5h4NjPxhDHX0lnR3Q1OpQUFyoFqIGpc4gmN24lpoLF3VwRtILwR7Q0uWW+JdJjaLfACq2wbja1SsTQv6eqswaD6SffRyEO8QgIamyG07d8v5Wl42ufTqsnX2grRCooaQk8VKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eLbjgwmK; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eLbjgwmK" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4891d7164ddso7944865e9.3 for ; Thu, 30 Apr 2026 14:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777585148; x=1778189948; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NHSNVXnHE7UFetmSs3/3K+W0Sl2EX7Mfxn+azRRC0QU=; b=eLbjgwmKZBfRwpT0Th3bDwKzyDGnArgpJa3gC55YtFTGigSTa28/lHav1VtCXzbmp9 vdqBOpgOxGQ7GIKvrHFR4QUSqLNdLVrEBPT0ixWmMYzLXT87hWF3kTTZ8+JoD3Clf1oJ VJbSjmbPhHqpCTMHJx2dhR5/MPXgbONbJ+7h+cfvb3JC8nRHYA93Nla/wHCA79k0g+iz gOIEMGGPRnh8zbKyuOrFoCUbhWN5ZbV4RdRupjKa8CM1TlJkhMg0qhUN+gGMB6WKHfmy vNBzFQv+1Rit2Xw7F8liVr/k9t6UQW/rpLgMtcgJko3Smc5oCOZTrSYN1agtp+2DpK6F YL6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777585148; x=1778189948; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NHSNVXnHE7UFetmSs3/3K+W0Sl2EX7Mfxn+azRRC0QU=; b=A60fjbMBePX94Jh/khiVpQT2CaNtxSIRzRn1ECwu/VlSIrBtTecjdNs+Ju8k+G1q/J rulqvh157KqYK043OvFeMcXGvhsIEWmcxxk02DMDbkiLBuuCHWixoSjea06QMF8Aht8E Qebon9VgR9C7TyFvCVCwrrJh79yaK2gPt7ejQ+8Idvc7U4IdRM0aKAjaHAvxrNwhPQbO zkY/zx3JJ15ow42c8IrS1dw3/ChP0IuwSbKRkpIcmKpx8XLmdwcjxWMuew0Q+0RlHuMC Iq8+CIJoSOI2B1m/51YzcX4bvRda606LKJ3/iC9J1pb0nGjvKN9nalUztP/FSjRYKz4m l12Q== X-Gm-Message-State: AOJu0Yz2pj6x9Nyl59RwWt3Rn/a6pW99G4Jn9+W8vbcfhdrQ7tU3Lo42 ek/+q49kYCsE0/fyt4j/kS0U/0GQLlvz7luRT1CVteuBwsySMlW4rPF1 X-Gm-Gg: AeBDiesSlkZRZ/BezZD1EEQLrG1EoUbcKyPmfzXaSfjTKgdnoKbyJ4DPuU/KGwlHmSc aEkvULteE8/an1HSJTFg0pHFiatvveJ32Afcg8Wefpx9LiFlz9JyWN9sngA2d1W1drD9ci/ppo4 CF6tc1L5TCJN+bQDFR4lnSlm4fvQA+FF4/I02+PvrjD0vFPPyKACCz4vMOMxxuAN7NvI+mXGfAa EBs/wTKqR9FJtLrrmrJDBMhOCUcvVqZ+DqautNrvAP1zBzgesYDI0nEFr5Ng8IU00SuX/xndaPT OB5K5AI44ez/ITai60RwSsQcw/qSkCbpYAkxyrc0Ke37KnNo5ezcCpQkeDwIl6rkYF2l2EjiNcn rDmak/xrvIWeLIWl65i/mhxVr2Sbdy3SiuFayM4VPHkPhXikhfkGKSRFedrjrxejHAVsXGZVQzM mMvmLqi7s8vvHZzxHqYh97PUlhDG5ih/Hn3vyTGp3P X-Received: by 2002:a05:600c:8b84:b0:480:69b6:dfed with SMTP id 5b1f17b1804b1-48a84460ab3mr77944765e9.24.1777585147984; Thu, 30 Apr 2026 14:39:07 -0700 (PDT) Received: from yuri-framework13 ([78.211.51.156]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-44a9879ef89sm418510f8f.30.2026.04.30.14.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 14:39:07 -0700 (PDT) From: Yuri Andriaccio To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider Cc: linux-kernel@vger.kernel.org, Luca Abeni , Yuri Andriaccio Subject: [RFC PATCH v5 17/29] sched/rt: Remove old RT_GROUP_SCHED data structures Date: Thu, 30 Apr 2026 23:38:21 +0200 Message-ID: <20260430213835.62217-18-yurand2000@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260430213835.62217-1-yurand2000@gmail.com> References: <20260430213835.62217-1-yurand2000@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: luca abeni Completely remove the old RT_GROUP_SCHED's functions and data structures: - Remove the fields back and my_q from sched_rt_entity. - Remove the rt_bandwidth data structure. - Remove the field rt_bandwidth from task_group. - Remove the rt_bandwidth_enabled function. - Remove the fields rt_queued, rt_throttled, rt_time, rt_runtime, rt_runtime_lock and rt_nr_boosted from rt_rq. All of the removed fields and data are similarly represented in previously added fields in rq, rt_rq, dl_bandwidth and in the dl server themselves. Co-developed-by: Yuri Andriaccio Signed-off-by: Yuri Andriaccio Signed-off-by: luca abeni --- include/linux/sched.h | 3 --- kernel/sched/sched.h | 32 -------------------------------- 2 files changed, 35 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index ea2e74598b93..2740f043e534 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -628,12 +628,9 @@ struct sched_rt_entity { unsigned short on_rq; unsigned short on_list; - struct sched_rt_entity *back; #ifdef CONFIG_RT_GROUP_SCHED /* rq on which this entity is (to be) queued: */ struct rt_rq *rt_rq; - /* rq "owned" by this entity/group: */ - struct rt_rq *my_q; #endif } __randomize_layout; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 78f080275bf0..a4435f107cfe 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -313,15 +313,6 @@ struct rt_prio_array { struct list_head queue[MAX_RT_PRIO]; }; -struct rt_bandwidth { - /* nests inside the rq lock: */ - raw_spinlock_t rt_runtime_lock; - ktime_t rt_period; - u64 rt_runtime; - struct hrtimer rt_period_timer; - unsigned int rt_period_active; -}; - struct dl_bandwidth { raw_spinlock_t dl_runtime_lock; u64 dl_runtime; @@ -341,12 +332,6 @@ static inline int dl_bandwidth_enabled(void) * - cache the fraction of bandwidth that is currently allocated in * each root domain; * - * This is all done in the data structure below. It is similar to the - * one used for RT-throttling (rt_bandwidth), with the main difference - * that, since here we are only interested in admission control, we - * do not decrease any runtime while the group "executes", neither we - * need a timer to replenish it. - * * With respect to SMP, bandwidth is given on a per root domain basis, * meaning that: * - bw (< 100%) is the deadline bandwidth of each CPU; @@ -513,7 +498,6 @@ struct task_group { struct sched_dl_entity **dl_se; struct rt_rq **rt_rq; - struct rt_bandwidth rt_bandwidth; struct dl_bandwidth dl_bandwidth; #endif @@ -831,11 +815,6 @@ struct scx_rq { }; #endif /* CONFIG_SCHED_CLASS_EXT */ -static inline int rt_bandwidth_enabled(void) -{ - return 0; -} - /* RT IPI pull logic requires IRQ_WORK */ #if defined(CONFIG_IRQ_WORK) && defined(CONFIG_SMP) # define HAVE_RT_PUSH_IPI @@ -853,17 +832,6 @@ struct rt_rq { bool overloaded; struct plist_head pushable_tasks; - int rt_queued; - -#ifdef CONFIG_RT_GROUP_SCHED - int rt_throttled; - u64 rt_time; /* consumed RT time, goes up in update_curr_rt */ - u64 rt_runtime; /* allotted RT time, "slice" from rt_bandwidth, RT sharing/balancing */ - /* Nests inside the rq lock: */ - raw_spinlock_t rt_runtime_lock; - - unsigned int rt_nr_boosted; -#endif #ifdef CONFIG_CGROUP_SCHED struct task_group *tg; /* this tg has "this" rt_rq on given CPU for runnable entities */ #endif -- 2.53.0