From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Shrikanth Hegde <sshegde@linux.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Valentin Schneider <vschneid@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mel Gorman <mgorman@suse.de>,
Vincent Guittot <vincent.guittot@linaro.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Juri Lelli <juri.lelli@redhat.com>
Subject: [PATCH 07/43] sched: Clean up and standardize #if/#else/#endif markers in sched/deadline.c
Date: Wed, 28 May 2025 10:08:48 +0200 [thread overview]
Message-ID: <20250528080924.2273858-8-mingo@kernel.org> (raw)
In-Reply-To: <20250528080924.2273858-1-mingo@kernel.org>
- Use the standard #ifdef marker format for larger blocks,
where appropriate:
#if CONFIG_FOO
...
#else /* !CONFIG_FOO: */
...
#endif /* !CONFIG_FOO */
- Fix whitespace noise and other inconsistencies.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/deadline.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index ad45a8fea245..7df38ea4d650 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -51,7 +51,7 @@ static int __init sched_dl_sysctl_init(void)
return 0;
}
late_initcall(sched_dl_sysctl_init);
-#endif
+#endif /* CONFIG_SYSCTL */
static bool dl_server(struct sched_dl_entity *dl_se)
{
@@ -99,7 +99,7 @@ static inline bool is_dl_boosted(struct sched_dl_entity *dl_se)
{
return pi_of(dl_se) != dl_se;
}
-#else
+#else /* !CONFIG_RT_MUTEXES: */
static inline struct sched_dl_entity *pi_of(struct sched_dl_entity *dl_se)
{
return dl_se;
@@ -109,7 +109,7 @@ static inline bool is_dl_boosted(struct sched_dl_entity *dl_se)
{
return false;
}
-#endif
+#endif /* !CONFIG_RT_MUTEXES */
#ifdef CONFIG_SMP
static inline struct dl_bw *dl_bw_of(int i)
@@ -191,7 +191,7 @@ void __dl_update(struct dl_bw *dl_b, s64 bw)
rq->dl.extra_bw += bw;
}
}
-#else
+#else /* !CONFIG_SMP: */
static inline struct dl_bw *dl_bw_of(int i)
{
return &cpu_rq(i)->dl.dl_bw;
@@ -219,7 +219,7 @@ void __dl_update(struct dl_bw *dl_b, s64 bw)
dl->extra_bw += bw;
}
-#endif
+#endif /* !CONFIG_SMP */
static inline
void __dl_sub(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
@@ -753,7 +753,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p
return later_rq;
}
-#else
+#else /* !CONFIG_SMP: */
static inline
void enqueue_pushable_dl_task(struct rq *rq, struct task_struct *p)
@@ -782,7 +782,7 @@ static inline void deadline_queue_push_tasks(struct rq *rq)
static inline void deadline_queue_pull_task(struct rq *rq)
{
}
-#endif /* CONFIG_SMP */
+#endif /* !CONFIG_SMP */
static void
enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags);
@@ -1209,7 +1209,7 @@ static void __push_dl_task(struct rq *rq, struct rq_flags *rf)
push_dl_task(rq);
rq_repin_lock(rq, rf);
}
-#endif
+#endif /* CONFIG_SMP */
}
/* a defer timer will not be reset if the runtime consumed was < dl_server_min_res */
@@ -1356,7 +1356,7 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
* there.
*/
}
-#endif
+#endif /* CONFIG_SMP */
enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
if (dl_task(rq->donor))
@@ -1598,7 +1598,7 @@ static void update_curr_dl_se(struct rq *rq, struct sched_dl_entity *dl_se, s64
rt_rq->rt_time += delta_exec;
raw_spin_unlock(&rt_rq->rt_runtime_lock);
}
-#endif
+#endif /* CONFIG_RT_GROUP_SCHED */
}
/*
@@ -1881,12 +1881,12 @@ static void dec_dl_deadline(struct dl_rq *dl_rq, u64 deadline)
}
}
-#else
+#else /* !CONFIG_SMP: */
static inline void inc_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {}
static inline void dec_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {}
-#endif /* CONFIG_SMP */
+#endif /* !CONFIG_SMP */
static inline
void inc_dl_tasks(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
@@ -2375,11 +2375,11 @@ static void start_hrtick_dl(struct rq *rq, struct sched_dl_entity *dl_se)
{
hrtick_start(rq, dl_se->runtime);
}
-#else /* !CONFIG_SCHED_HRTICK */
+#else /* !CONFIG_SCHED_HRTICK: */
static void start_hrtick_dl(struct rq *rq, struct sched_dl_entity *dl_se)
{
}
-#endif
+#endif /* !CONFIG_SCHED_HRTICK */
static void set_next_task_dl(struct rq *rq, struct task_struct *p, bool first)
{
@@ -3121,13 +3121,13 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p,
dl_time_before(p->dl.deadline, rq->curr->dl.deadline))
resched_curr(rq);
}
-#else
+#else /* !CONFIG_SMP: */
/*
* We don't know if p has a earlier or later deadline, so let's blindly
* set a (maybe not needed) rescheduling point.
*/
resched_curr(rq);
-#endif
+#endif /* !CONFIG_SMP */
}
#ifdef CONFIG_SCHED_CORE
@@ -3158,7 +3158,7 @@ DEFINE_SCHED_CLASS(dl) = {
.rq_offline = rq_offline_dl,
.task_woken = task_woken_dl,
.find_lock_rq = find_lock_later_rq,
-#endif
+#endif /* CONFIG_SMP */
.task_tick = task_tick_dl,
.task_fork = task_fork_dl,
@@ -3570,7 +3570,7 @@ void dl_bw_free(int cpu, u64 dl_bw)
{
dl_bw_manage(dl_bw_req_free, cpu, dl_bw);
}
-#endif
+#endif /* CONFIG_SMP */
void print_dl_stats(struct seq_file *m, int cpu)
{
--
2.45.2
next prev parent reply other threads:[~2025-05-28 8:10 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 8:08 [PATCH 00/43] sched: Use the SMP scheduler on UP too Ingo Molnar
2025-05-28 8:08 ` [PATCH 01/43] sched: Clean up and standardize #if/#else/#endif markers in sched/autogroup.[ch] Ingo Molnar
2025-05-30 2:29 ` Sohil Mehta
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 02/43] sched: Clean up and standardize #if/#else/#endif markers in sched/clock.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 03/43] sched: Clean up and standardize #if/#else/#endif markers in sched/core.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 04/43] sched: Clean up and standardize #if/#else/#endif markers in sched/cpufreq_schedutil.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 05/43] sched: Clean up and standardize #if/#else/#endif markers in sched/cpupri.h Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 06/43] sched: Clean up and standardize #if/#else/#endif markers in sched/cputime.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` Ingo Molnar [this message]
2025-06-13 7:37 ` [tip: sched/core] sched: Clean up and standardize #if/#else/#endif markers in sched/deadline.c tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 08/43] sched: Clean up and standardize #if/#else/#endif markers in sched/debug.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 09/43] sched: Clean up and standardize #if/#else/#endif markers in sched/fair.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 10/43] sched: Clean up and standardize #if/#else/#endif markers in sched/idle.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 11/43] sched: Clean up and standardize #if/#else/#endif markers in sched/loadavg.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 12/43] sched: Clean up and standardize #if/#else/#endif markers in sched/pelt.[ch] Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 13/43] sched: Clean up and standardize #if/#else/#endif markers in sched/psi.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 14/43] sched: Clean up and standardize #if/#else/#endif markers in sched/rt.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 15/43] sched: Clean up and standardize #if/#else/#endif markers in sched/sched.h Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 16/43] sched: Clean up and standardize #if/#else/#endif markers in sched/stats.[ch] Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 17/43] sched: Clean up and standardize #if/#else/#endif markers in sched/syscalls.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:08 ` [PATCH 18/43] sched: Clean up and standardize #if/#else/#endif markers in sched/topology.c Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 19/43] sched/smp: Always define sched_domains_mutex_lock()/unlock(), def_root_domain and sched_domains_mutex Ingo Molnar
2025-05-28 8:14 ` [PATCH 20/43] sched/smp: Make SMP unconditional Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] sched/smp: Always define sched_domains_mutex_lock()/unlock(), def_root_domain and sched_domains_mutex tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 20/43] sched/smp: Make SMP unconditional Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 21/43] sched/smp: Always define is_percpu_thread() and scheduler_ipi() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 22/43] sched/smp: Always define rq->hrtick_csd Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 23/43] sched/smp: Use the SMP version of try_to_wake_up() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 24/43] sched/smp: Use the SMP version of __task_needs_rq_lock() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 25/43] sched/smp: Use the SMP version of wake_up_new_task() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 26/43] sched/smp: Use the SMP version of sched_exec() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 27/43] sched/smp: Use the SMP version of idle_thread_set_boot_cpu() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 28/43] sched/smp: Use the SMP version of the RT scheduling class Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 29/43] sched/smp: Use the SMP version of the deadline " Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 30/43] sched/smp: Use the SMP version of scheduler debugging data Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 31/43] sched/smp: Use the SMP version of schedstats Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 32/43] sched/smp: Use the SMP version of the scheduler syscalls Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 33/43] sched/smp: Use the SMP version of sched_update_asym_prefer_cpu() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 34/43] sched/smp: Use the SMP version of the idle scheduling class Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 35/43] sched/smp: Use the SMP version of the stop-CPU " Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 36/43] sched/smp: Use the SMP version of cpu_of() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 37/43] sched/smp: Use the SMP version of is_migration_disabled() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 38/43] sched/smp: Use the SMP version of rq_pin_lock() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 39/43] sched/smp: Use the SMP version of task_on_cpu() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 40/43] sched/smp: Use the SMP version of WF_ and SD_ flag sanity checks Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 41/43] sched/smp: Use the SMP version of ENQUEUE_MIGRATED Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 42/43] sched/smp: Use the SMP version of add_nr_running() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:09 ` [PATCH 43/43] sched/smp: Use the SMP version of double_rq_clock_clear_update() Ingo Molnar
2025-06-13 7:37 ` [tip: sched/core] " tip-bot2 for Ingo Molnar
2025-05-28 8:58 ` [PATCH 00/43] sched: Use the SMP scheduler on UP too Peter Zijlstra
2025-05-28 14:00 ` Steven Rostedt
2025-05-28 16:10 ` Peter Zijlstra
2025-05-28 16:21 ` Steven Rostedt
2025-05-29 6:42 ` Ingo Molnar
2025-05-30 9:34 ` [PATCH] sched: Break dependency loop between sched.h and preempt.h Herbert Xu
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=20250528080924.2273858-8-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sshegde@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®