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] [day] [month] [year] [list]
Message-Id: <1239184481.24828.1374.camel@twins>
Date:	Wed, 08 Apr 2009 11:54:41 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	"figo.zhang" <figo.zhang@...orific.com>
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH]kernel/sched_fair.c: task_new_fair() have call
 update_curr() twice

On Wed, 2009-04-08 at 10:10 +0800, figo.zhang wrote:
> The task_new_fair() will call update_curr() twice, one is in
> task_new_fair(), and other one in
> enqueue_task_fair()->enqueue_entity(), they do the same,  so  it
> should be need one time.
> 
> Signed-off-by: figo.zhang <figo.zhang@...orific.com>
> 
> 
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 3816f21..d5913bb 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -1713,7 +1713,7 @@ static void task_new_fair(struct rq *rq, struct
> task_struct *p) 
>  	sched_info_queued(p);
>  
> -	update_curr(cfs_rq);
> +
>  	place_entity(cfs_rq, se, 1);
>  
>  	/* 'curr' will be NULL if the child belongs to a different
> group */

Except that update_curr() changes ->vruntime, and place_entity() uses
->vruntime. Therefore the above is not a NOP.


--
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