History

sched: Rename sched_info_{queued,dequeued}

For consistency, rename {queued,dequeued} to {enqueue,dequeue}.

Peter Zijlstra committed 5 years ago

Commit 4e29fb71 parent 4b7a08a2 files · +12 −12Browse files

Showing the changes to kernel (2 of 2 files). Show all

Unified · Split

2 files
  1. kernel/sched/core.c +2 −2
  2. kernel/sched/stats.h +10 −10
kernel/sched/core.c+2−2
@@ -1595,7 +1595,7 @@ static inline void enqueue_task(struct rq *rq, struct task_struct *p, int flags) · 1594 unmodified lines
15951595 update_rq_clock(rq);
15961596
15971597 if (!(flags & ENQUEUE_RESTORE)) {
1598− sched_info_queued(rq, p);
1598+ sched_info_enqueue(rq, p);
15991599 psi_enqueue(p, flags & ENQUEUE_WAKEUP);
16001600 }
16011601
@@ -1609,7 +1609,7 @@ static inline void dequeue_task(struct rq *rq, struct task_struct *p, int flags) · 7 unmodified lines
16091609 update_rq_clock(rq);
16101610
16111611 if (!(flags & DEQUEUE_SAVE)) {
1612− sched_info_dequeued(rq, p);
1612+ sched_info_dequeue(rq, p);
16131613 psi_dequeue(p, flags & DEQUEUE_SLEEP);
16141614 }
16151615
kernel/sched/stats.h+10−10
@@ -25,7 +25,7 @@ rq_sched_info_depart(struct rq *rq, unsigned long long delta) · 24 unmodified lines
2525 }
2626
2727 static inline void
28−rq_sched_info_dequeued(struct rq *rq, unsigned long long delta)
28+rq_sched_info_dequeue(struct rq *rq, unsigned long long delta)
2929 {
3030 if (rq)
3131 rq->rq_sched_info.run_delay += delta;
@@ -42,7 +42,7 @@ rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) · 10 unmodified lines
4242
4343 #else /* !CONFIG_SCHEDSTATS: */
4444 static inline void rq_sched_info_arrive (struct rq *rq, unsigned long long delta) { }
45−static inline void rq_sched_info_dequeued(struct rq *rq, unsigned long long delta) { }
45+static inline void rq_sched_info_dequeue(struct rq *rq, unsigned long long delta) { }
4646 static inline void rq_sched_info_depart (struct rq *rq, unsigned long long delta) { }
4747 # define schedstat_enabled() 0
4848 # define __schedstat_inc(var) do { } while (0)
@@ -161,7 +161,7 @@ static inline void sched_info_reset_dequeued(struct task_struct *t) · 112 unmodified lines
161161 * from dequeue_task() to account for possible rq->clock skew across CPUs. The
162162 * delta taken on each CPU would annul the skew.
163163 */
164−static inline void sched_info_dequeued(struct rq *rq, struct task_struct *t)
164+static inline void sched_info_dequeue(struct rq *rq, struct task_struct *t)
165165 {
166166 unsigned long long now = rq_clock(rq), delta = 0;
167167
@@ -172,7 +172,7 @@ static inline void sched_info_dequeued(struct rq *rq, struct task_struct *t) · 4 unmodified lines
172172 sched_info_reset_dequeued(t);
173173 t->sched_info.run_delay += delta;
174174
175− rq_sched_info_dequeued(rq, delta);
175+ rq_sched_info_dequeue(rq, delta);
176176 }
177177
178178 /*
@@ -197,9 +197,9 @@ static void sched_info_arrive(struct rq *rq, struct task_struct *t) · 18 unmodified lines
197197 /*
198198 * This function is only called from enqueue_task(), but also only updates
199199 * the timestamp if it is already not set. It's assumed that
200− * sched_info_dequeued() will clear that stamp when appropriate.
200+ * sched_info_dequeue() will clear that stamp when appropriate.
201201 */
202−static inline void sched_info_queued(struct rq *rq, struct task_struct *t)
202+static inline void sched_info_enqueue(struct rq *rq, struct task_struct *t)
203203 {
204204 if (sched_info_on()) {
205205 if (!t->sched_info.last_queued)
@@ -212,7 +212,7 @@ static inline void sched_info_queued(struct rq *rq, struct task_struct *t) · 6 unmodified lines
212212 * due, typically, to expiring its time slice (this may also be called when
213213 * switching to the idle task). Now we can calculate how long we ran.
214214 * Also, if the process is still in the TASK_RUNNING state, call
215− * sched_info_queued() to mark that it has now again started waiting on
215+ * sched_info_enqueue() to mark that it has now again started waiting on
216216 * the runqueue.
217217 */
218218 static inline void sched_info_depart(struct rq *rq, struct task_struct *t)
@@ -222,7 +222,7 @@ static inline void sched_info_depart(struct rq *rq, struct task_struct *t) · 3 unmodified lines
222222 rq_sched_info_depart(rq, delta);
223223
224224 if (t->state == TASK_RUNNING)
225− sched_info_queued(rq, t);
225+ sched_info_enqueue(rq, t);
226226 }
227227
228228 /*
@@ -253,9 +253,9 @@ sched_info_switch(struct rq *rq, struct task_struct *prev, struct task_struct *n · 24 unmodified lines
253253 }
254254
255255 #else /* !CONFIG_SCHED_INFO: */
256−# define sched_info_queued(rq, t) do { } while (0)
256+# define sched_info_enqueue(rq, t) do { } while (0)
257257 # define sched_info_reset_dequeued(t) do { } while (0)
258−# define sched_info_dequeued(rq, t) do { } while (0)
258+# define sched_info_dequeue(rq, t) do { } while (0)
259259 # define sched_info_depart(rq, t) do { } while (0)
260260 # define sched_info_arrive(rq, next) do { } while (0)
261261 # define sched_info_switch(rq, t, next) do { } while (0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t