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: <20150706115710.GB31287@byungchulpark-X58A-UD3R>
Date:	Mon, 6 Jul 2015 20:57:10 +0900
From:	Byungchul Park <byungchul.park@....com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	mingo@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] sched: make update_min_vruntime() more readable

On Mon, Jul 06, 2015 at 01:26:53PM +0200, Peter Zijlstra wrote:
> On Sun, Jul 05, 2015 at 06:33:48PM +0900, byungchul.park@....com wrote:
> > From: Byungchul Park <byungchul.park@....com>
> > 
> > update_min_vruntime() condition flow can be simpler
> 
> This changelog needs help; a few more words on why this is correct and
> simpler would not go amiss, and you should mention you're deleting some
> spurious trailing whitespace.

hello,

thank you for your advice!
i will add a supplementary explanation.

thank you,
byungchul

> 
> > Signed-off-by: Byungchul Park <byungchul.park@....com>
> > ---
> >  kernel/sched/fair.c |   17 +++++++----------
> >  1 file changed, 7 insertions(+), 10 deletions(-)
> > 
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 3d57cc0..59de964 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -463,20 +463,17 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq)
> >  {
> >  	u64 vruntime = cfs_rq->min_vruntime;
> >  
> > -	if (cfs_rq->curr)
> > -		vruntime = cfs_rq->curr->vruntime;
> > -
> >  	if (cfs_rq->rb_leftmost) {
> >  		struct sched_entity *se = rb_entry(cfs_rq->rb_leftmost,
> >  						   struct sched_entity,
> >  						   run_node);
> >  
> > -		if (!cfs_rq->curr)
> > -			vruntime = se->vruntime;
> > -		else
> > -			vruntime = min_vruntime(vruntime, se->vruntime);
> > +		vruntime = se->vruntime;
> >  	}
> >  
> > +	if (cfs_rq->curr)
> > +		vruntime = min_vruntime(vruntime, cfs_rq->curr->vruntime);
> > +
> >  	/* ensure we never gain time by being placed backwards. */
> >  	cfs_rq->min_vruntime = max_vruntime(cfs_rq->min_vruntime, vruntime);
> >  #ifndef CONFIG_64BIT
> --
> 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/
--
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