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: <20160614113828.GH2658@codeblueprint.co.uk>
Date:	Tue, 14 Jun 2016 12:38:28 +0100
From:	Matt Fleming <matt@...eblueprint.co.uk>
To:	Yuyang Du <yuyang.du@...el.com>
Cc:	peterz@...radead.org, mingo@...nel.org,
	linux-kernel@...r.kernel.org, bsegall@...gle.com, pjt@...gle.com,
	morten.rasmussen@....com, vincent.guittot@...aro.org,
	dietmar.eggemann@....com
Subject: Re: [PATCH v5 4/5] sched/fair: Skip detach sched avgs for new task
 when changing task groups

On Thu, 09 Jun, at 07:15:53AM, Yuyang Du wrote:
> Newly forked task has not been enqueued, so should not be removed from
> cfs_rq in task_move_group_fair(). To do so, we identify newly forked
> tasks by their sched_avg's last_update_time in detach_entity_load_avg().
> 
> Signed-off-by: Yuyang Du <yuyang.du@...el.com>
> ---
>  kernel/sched/fair.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 6e870c6..e0f219b 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -2943,6 +2943,10 @@ static inline void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_en
>  
>  static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  {
> +	/* Newly forked tasks are not attached yet. */
> +	if (!se->avg.last_update_time)
> +		return;
> +

Now that we no longer have the @fork parameter to provide context,
this comment would benefit from some expansion. What about something
like this,

	/*
	 * Newly forked tasks that are being moved between groups
	 * haven't been enqueued anywhere yet, and don't need detaching.
	 */

?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ