From: Peter Zijlstra <peterz@infradead.org>
To: mingo@kernel.org
Cc: peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, tj@kernel.org, void@manifault.com,
linux-kernel@vger.kernel.org
Subject: [RFC][PATCH 3/6] sched: Re-arrange the {EN,DE}QUEUE flags
Date: Wed, 30 Oct 2024 16:12:58 +0100 [thread overview]
Message-ID: <20241030152142.602414152@infradead.org> (raw)
In-Reply-To: 20241030151255.300069509@infradead.org
Ensure the matched flags are in the low byte while the unmatched flags
go into the second byte.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
kernel/sched/sched.h | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2337,26 +2337,25 @@ extern const u32 sched_prio_to_wmult[40
#define DEQUEUE_SAVE 0x02 /* Matches ENQUEUE_RESTORE */
#define DEQUEUE_MOVE 0x04 /* Matches ENQUEUE_MOVE */
#define DEQUEUE_NOCLOCK 0x08 /* Matches ENQUEUE_NOCLOCK */
-#define DEQUEUE_SPECIAL 0x10
-#define DEQUEUE_MIGRATING 0x100 /* Matches ENQUEUE_MIGRATING */
-#define DEQUEUE_DELAYED 0x200 /* Matches ENQUEUE_DELAYED */
+
+#define DEQUEUE_MIGRATING 0x10 /* Matches ENQUEUE_MIGRATING */
+#define DEQUEUE_DELAYED 0x20 /* Matches ENQUEUE_DELAYED */
+
+#define DEQUEUE_SPECIAL 0x0100
#define ENQUEUE_WAKEUP 0x01
#define ENQUEUE_RESTORE 0x02
#define ENQUEUE_MOVE 0x04
#define ENQUEUE_NOCLOCK 0x08
-#define ENQUEUE_HEAD 0x10
-#define ENQUEUE_REPLENISH 0x20
-#ifdef CONFIG_SMP
-#define ENQUEUE_MIGRATED 0x40
-#else
-#define ENQUEUE_MIGRATED 0x00
-#endif
-#define ENQUEUE_INITIAL 0x80
-#define ENQUEUE_MIGRATING 0x100
-#define ENQUEUE_DELAYED 0x200
-#define ENQUEUE_RQ_SELECTED 0x400
+#define ENQUEUE_MIGRATING 0x10
+#define ENQUEUE_DELAYED 0x20
+
+#define ENQUEUE_HEAD 0x0100
+#define ENQUEUE_REPLENISH 0x0200
+#define ENQUEUE_MIGRATED (0x0400*IS_ENABLED(CONFIG_SMP))
+#define ENQUEUE_INITIAL 0x0800
+#define ENQUEUE_RQ_SELECTED 0x1000
#define RETRY_TASK ((void *)-1UL)
next prev parent reply other threads:[~2024-10-30 15:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 15:12 [RFC][PATCH 0/6] clean up class switching Peter Zijlstra
2024-10-30 15:12 ` [PATCH 1/6] sched/ext: Fix scx vs sched_delayed Peter Zijlstra
2024-10-30 15:50 ` Christian Loehle
2024-10-30 15:54 ` Peter Zijlstra
2024-10-30 17:17 ` Christian Loehle
2024-10-30 20:19 ` Tejun Heo
2024-10-30 15:12 ` [RFC][PATCH 2/6] sched: Employ sched_change guards Peter Zijlstra
2024-10-30 20:58 ` Tejun Heo
2024-10-30 21:09 ` Tejun Heo
2024-10-30 21:11 ` Peter Zijlstra
2024-10-30 15:12 ` Peter Zijlstra [this message]
2024-10-30 15:12 ` [RFC][PATCH 4/6] sched: Fold sched_class::switch{ing,ed}_{to,from}() into the change pattern Peter Zijlstra
2024-10-30 21:12 ` Tejun Heo
2024-10-30 21:15 ` Peter Zijlstra
2024-10-30 21:29 ` Tejun Heo
2024-10-30 21:37 ` Peter Zijlstra
2024-10-30 21:39 ` Tejun Heo
2024-10-30 15:13 ` [RFC][PATCH 5/6] sched: Add flags to the switch{ing,ed}_{to,from}() methods Peter Zijlstra
2024-10-30 15:13 ` [RFC][PATCH 6/6] sched: Cleanup sched_delayed handling for class switches Peter Zijlstra
2024-10-30 15:45 ` Peter Zijlstra
2024-10-30 21:27 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030152142.602414152@infradead.org \
--to=peterz@infradead.org \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=void@manifault.com \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.