* [PATCH]sched/deadline: Remove useless dl_nr_total
@ 2014-02-17 22:24 Kirill Tkhai
2014-02-18 11:02 ` Juri Lelli
2014-02-21 20:32 ` [tip:sched/urgent] sched/deadline: " tip-bot for Kirill Tkhai
0 siblings, 2 replies; 3+ messages in thread
From: Kirill Tkhai @ 2014-02-17 22:24 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org; +Cc: Juri Lelli, Peter Zijlstra, Ingo Molnar
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.
Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
CC: Juri Lelli <juri.lelli@gmail.com>
CC: Peter Zijlstra <peterz@infradead.org>
CC: Ingo Molnar <mingo@redhat.com>
---
kernel/sched/deadline.c | 4 +---
kernel/sched/sched.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index ed31ef6..7a0db95 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -121,7 +121,7 @@ static inline void dl_clear_overload(struct rq *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) {
dl_set_overload(rq_of_dl_rq(dl_rq));
dl_rq->overloaded = 1;
@@ -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);
dl_rq = &rq_of_dl_rq(dl_rq)->dl;
- dl_rq->dl_nr_total++;
if (p->nr_cpus_allowed > 1)
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)
struct task_struct *p = dl_task_of(dl_se);
dl_rq = &rq_of_dl_rq(dl_rq)->dl;
- dl_rq->dl_nr_total--;
if (p->nr_cpus_allowed > 1)
dl_rq->dl_nr_migratory--;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 1bf34c2..6a00804 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -444,7 +444,6 @@ struct dl_rq {
} earliest_dl;
unsigned long dl_nr_migratory;
- unsigned long dl_nr_total;
int overloaded;
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH]sched/deadline: Remove useless dl_nr_total
2014-02-17 22:24 [PATCH]sched/deadline: Remove useless dl_nr_total Kirill Tkhai
@ 2014-02-18 11:02 ` Juri Lelli
2014-02-21 20:32 ` [tip:sched/urgent] sched/deadline: " tip-bot for Kirill Tkhai
1 sibling, 0 replies; 3+ messages in thread
From: Juri Lelli @ 2014-02-18 11:02 UTC (permalink / raw)
To: Kirill Tkhai, linux-kernel@vger.kernel.org; +Cc: Peter Zijlstra, Ingo Molnar
Hi,
On 02/17/2014 11:24 PM, Kirill Tkhai wrote:
> 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.
>
Thanks!
- Juri
> Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
> CC: Juri Lelli <juri.lelli@gmail.com>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: Ingo Molnar <mingo@redhat.com>
> ---
> kernel/sched/deadline.c | 4 +---
> kernel/sched/sched.h | 1 -
> 2 files changed, 1 insertion(+), 4 deletions(-)
> diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
> index ed31ef6..7a0db95 100644
> --- a/kernel/sched/deadline.c
> +++ b/kernel/sched/deadline.c
> @@ -121,7 +121,7 @@ static inline void dl_clear_overload(struct rq *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) {
> dl_set_overload(rq_of_dl_rq(dl_rq));
> dl_rq->overloaded = 1;
> @@ -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);
> dl_rq = &rq_of_dl_rq(dl_rq)->dl;
>
> - dl_rq->dl_nr_total++;
> if (p->nr_cpus_allowed > 1)
> 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)
> struct task_struct *p = dl_task_of(dl_se);
> dl_rq = &rq_of_dl_rq(dl_rq)->dl;
>
> - dl_rq->dl_nr_total--;
> if (p->nr_cpus_allowed > 1)
> dl_rq->dl_nr_migratory--;
>
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index 1bf34c2..6a00804 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -444,7 +444,6 @@ struct dl_rq {
> } earliest_dl;
>
> unsigned long dl_nr_migratory;
> - unsigned long dl_nr_total;
> int overloaded;
>
> /*
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:sched/urgent] sched/deadline: Remove useless dl_nr_total
2014-02-17 22:24 [PATCH]sched/deadline: Remove useless dl_nr_total Kirill Tkhai
2014-02-18 11:02 ` Juri Lelli
@ 2014-02-21 20:32 ` tip-bot for Kirill Tkhai
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Kirill Tkhai @ 2014-02-21 20:32 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mingo, hpa, mingo, peterz, tkhai, tglx, juri.lelli
Commit-ID: 995b9ea440862def83e8fcb1b498e68f93d4af59
Gitweb: http://git.kernel.org/tip/995b9ea440862def83e8fcb1b498e68f93d4af59
Author: Kirill Tkhai <tkhai@yandex.ru>
AuthorDate: Tue, 18 Feb 2014 02:24:13 +0400
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 21 Feb 2014 21:27:10 +0100
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: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/368631392675853@web20h.yandex.ru
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/sched/deadline.c | 4 +---
kernel/sched/sched.h | 1 -
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index b819577..15cbc17 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -121,7 +121,7 @@ static inline void dl_clear_overload(struct rq *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) {
dl_set_overload(rq_of_dl_rq(dl_rq));
dl_rq->overloaded = 1;
@@ -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);
dl_rq = &rq_of_dl_rq(dl_rq)->dl;
- dl_rq->dl_nr_total++;
if (p->nr_cpus_allowed > 1)
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)
struct task_struct *p = dl_task_of(dl_se);
dl_rq = &rq_of_dl_rq(dl_rq)->dl;
- dl_rq->dl_nr_total--;
if (p->nr_cpus_allowed > 1)
dl_rq->dl_nr_migratory--;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index c2119fd..f964add 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -462,7 +462,6 @@ struct dl_rq {
} earliest_dl;
unsigned long dl_nr_migratory;
- unsigned long dl_nr_total;
int overloaded;
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-21 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 22:24 [PATCH]sched/deadline: Remove useless dl_nr_total Kirill Tkhai
2014-02-18 11:02 ` Juri Lelli
2014-02-21 20:32 ` [tip:sched/urgent] sched/deadline: " tip-bot for Kirill Tkhai
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.