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-next>] [day] [month] [year] [list]
Date:	Fri, 11 Dec 2015 18:01:45 -0800
From:	Steve Muckle <steve.muckle@...aro.org>
To:	"yuyang.du@...el.com" <yuyang.du@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Morten Rasmussen <morten.rasmussen@....com>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Patrick Bellasi <patrick.bellasi@....com>,
	Juri Lelli <Juri.Lelli@....com>,
	Vincent Guittot <vincent.guittot@...aro.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: PELT initial task load and wake_up_new_task()

In init_entity_runnable_average() the last_update_time is initialized to
zero. The task is given max load and utilization as a pessimistic
initial estimate.

But if in wake_up_new_task() the task is placed on a CPU other than
where it was created, __update_load_avg() will be called via
set_task_cpu() -> migrate_task_rq_fair() -> remove_entity_load_avg().

Since last_update_time is zero the delta will be huge and the task's
load will be entirely decayed away before it is enqueued at the
destination CPU.

If last_update_time is initialized to cfs_rq_clock_task() the load will
not go away, but it will also then be subtracted from the original CPU
in remove_entity_load_avg() if the task is placed on a different CPU,
which is bad since it was never added there before.

Thinking about this more it seemed questionable to treat the assignment
of a task to a new CPU in wake_up_new_task() as a migration given that
the task has never executed previously. Would it make sense to call
__set_task_cpu() there instead of set_task_cpu()?

thanks,
Steve
--
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