提交 995b9ea4 编写于 作者: K Kirill Tkhai 提交者: Thomas Gleixner

sched/deadline: Remove useless dl_nr_total

In deadline class we do not have group scheduling like in RT.

dl_nr_total is the same as dl_nr_running. So, one of them should
be removed.

Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: NKirill Tkhai <tkhai@yandex.ru>
Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/368631392675853@web20h.yandex.ruSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 82b95800
...@@ -121,7 +121,7 @@ static inline void dl_clear_overload(struct rq *rq) ...@@ -121,7 +121,7 @@ static inline void dl_clear_overload(struct rq *rq)
static void update_dl_migration(struct dl_rq *dl_rq) static void update_dl_migration(struct dl_rq *dl_rq)
{ {
if (dl_rq->dl_nr_migratory && dl_rq->dl_nr_total > 1) { if (dl_rq->dl_nr_migratory && dl_rq->dl_nr_running > 1) {
if (!dl_rq->overloaded) { if (!dl_rq->overloaded) {
dl_set_overload(rq_of_dl_rq(dl_rq)); dl_set_overload(rq_of_dl_rq(dl_rq));
dl_rq->overloaded = 1; dl_rq->overloaded = 1;
...@@ -137,7 +137,6 @@ static void inc_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) ...@@ -137,7 +137,6 @@ static void inc_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
struct task_struct *p = dl_task_of(dl_se); struct task_struct *p = dl_task_of(dl_se);
dl_rq = &rq_of_dl_rq(dl_rq)->dl; dl_rq = &rq_of_dl_rq(dl_rq)->dl;
dl_rq->dl_nr_total++;
if (p->nr_cpus_allowed > 1) if (p->nr_cpus_allowed > 1)
dl_rq->dl_nr_migratory++; dl_rq->dl_nr_migratory++;
...@@ -149,7 +148,6 @@ static void dec_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq) ...@@ -149,7 +148,6 @@ static void dec_dl_migration(struct sched_dl_entity *dl_se, struct dl_rq *dl_rq)
struct task_struct *p = dl_task_of(dl_se); struct task_struct *p = dl_task_of(dl_se);
dl_rq = &rq_of_dl_rq(dl_rq)->dl; dl_rq = &rq_of_dl_rq(dl_rq)->dl;
dl_rq->dl_nr_total--;
if (p->nr_cpus_allowed > 1) if (p->nr_cpus_allowed > 1)
dl_rq->dl_nr_migratory--; dl_rq->dl_nr_migratory--;
......
...@@ -462,7 +462,6 @@ struct dl_rq { ...@@ -462,7 +462,6 @@ struct dl_rq {
} earliest_dl; } earliest_dl;
unsigned long dl_nr_migratory; unsigned long dl_nr_migratory;
unsigned long dl_nr_total;
int overloaded; int overloaded;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册