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: <20140707200342.GA25653@intel.com>
Date:	Tue, 8 Jul 2014 04:03:42 +0800
From:	Yuyang Du <yuyang.du@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org,
	rafael.j.wysocki@...el.com, arjan.van.de.ven@...el.com,
	len.brown@...el.com, alan.cox@...el.com, mark.gross@...el.com,
	pjt@...gle.com, fengguang.wu@...el.com,
	Ben Segall <bsegall@...gle.com>
Subject: Re: [PATCH 2/2] sched: Rewrite per entity runnable load average
 tracking

Thanks, Peter.

On Mon, Jul 07, 2014 at 12:46:46PM +0200, Peter Zijlstra wrote:
> 
> That tg->load_avg cacheline is already red hot glowing, and you've just
> increased the amount of updates to it.. That's not going to be pleasant.
> 

Logically, this rewrite updates tg->load_avg as soon as it is changed. But
technically, this is not necessary, as it is only needed to be updated when
it is used before update_cfs_shares() and update_cfs_rq_h_load().

Yes, I can optimize it.

> So here you add the task to the cfs_rq avg when its got migrate in,
> however:
> 
> > @@ -4552,17 +4326,9 @@ migrate_task_rq_fair(struct task_struct *p, int next_cpu)
> >  	struct sched_entity *se = &p->se;
> >  	struct cfs_rq *cfs_rq = cfs_rq_of(se);
> >  
> > +	/* Update task on old CPU, then ready to go (entity must be off the queue) */
> > +	__update_load_avg(cfs_rq_clock_task(cfs_rq), &se->avg, 0);
> > +	se->avg.last_update_time = 0;
> >  
> >  	/* We have migrated, no longer consider this task hot */
> >  	se->exec_start = 0;
> 
> there you don't remove it first..
> 

Yes, I missed it. I wonder what I was thinking. Migration is the only reason
to track task load average...

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