lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53033DBB.107@gmail.com>
Date:	Tue, 18 Feb 2014 12:02:19 +0100
From:	Juri Lelli <juri.lelli@...il.com>
To:	Kirill Tkhai <tkhai@...dex.ru>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH]sched/deadline: Remove useless dl_nr_total

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@...dex.ru>
> CC: Juri Lelli <juri.lelli@...il.com> 
> CC: Peter Zijlstra <peterz@...radead.org>
> CC: Ingo Molnar <mingo@...hat.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;
>  
>  	/*
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ