[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aS1MgNKBkwUQLx7j@gmail.com>
Date: Mon, 1 Dec 2025 09:06:24 +0100
From: Ingo Molnar <mingo@...nel.org>
To: linux-kernel@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Valentin Schneider <vschneid@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>, Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: [PATCH 3/6 v2] sched/fair: Separate se->vlag from se->vprot
* Ingo Molnar <mingo@...nel.org> wrote:
> There's no real space concerns here and keeping these fields
> in a union makes reading (and tracing) the scheduler code harder.
>
> Signed-off-by: Ingo Molnar <mingo@...nel.org>
> ---
> include/linux/sched.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/sched.h b/include/linux/sched.h
> index e84bc5bce816..667fa08aee75 100644
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -586,7 +586,7 @@ struct sched_entity {
> u64 sum_exec_runtime;
> u64 prev_sum_exec_runtime;
> u64 vruntime;
> - union {
> +// union {
> /*
> * When !@...rq this field is vlag.
> * When cfs_rq->curr == se (which implies @on_rq)
> @@ -594,7 +594,7 @@ struct sched_entity {
> */
> s64 vlag;
> u64 vprot;
> - };
> +// };
> u64 slice;
>
> u64 nr_migrations;
Of course I meant the patch below. :-/
Thanks,
Ingo
===================================>
From: Ingo Molnar <mingo@...nel.org>
Date: Wed, 26 Nov 2025 05:31:28 +0100
Subject: [PATCH] sched/fair: Separate se->vlag from se->vprot
There's no real space concerns here and keeping these fields
in a union makes reading (and tracing) the scheduler code harder.
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
include/linux/sched.h | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e84bc5bce816..9aa38dc37b09 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -586,15 +586,10 @@ struct sched_entity {
u64 sum_exec_runtime;
u64 prev_sum_exec_runtime;
u64 vruntime;
- union {
- /*
- * When !@...rq this field is vlag.
- * When cfs_rq->curr == se (which implies @on_rq)
- * this field is vprot. See protect_slice().
- */
- s64 vlag;
- u64 vprot;
- };
+ /* Approximated virtual lag: */
+ s64 vlag;
+ /* 'Protected' deadline, to give out minimum quantums: */
+ u64 vprot;
u64 slice;
u64 nr_migrations;
Powered by blists - more mailing lists