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: <CAPM31RKTznL=VKrMG=NV6OGit6EUj46x63L7tWXd40CGTaZKOg@mail.gmail.com>
Date:	Fri, 26 Jul 2013 14:24:50 -0700
From:	Paul Turner <pjt@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Max Hailperin <max@...tavus.edu>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: PROBLEM: Persistent unfair sharing of a processor by auto groups
 in 3.11-rc2 (has twice regressed)

On Fri, Jul 26, 2013 at 2:03 PM, Peter Zijlstra <peterz@...radead.org> wrote:
>
>
> OK, so I have the below; however on a second look, Paul, shouldn't that
> update_cfs_shares() call be in entity_tick(), right after calling
> update_cfs_rq_blocked_load(). Because placing it in
> update_cfs_rq_blocked_load() means its now called twice on the
> enqueue/dequeue paths through:
>
>   {en,de}queue_entity()
>     {en,de}queue_entity_load_avg()
>       update_cfs_rq_blocked_load()
>         update_cfs_shares()

Yes, I agree: placing it directly in entity_tick() would be better.

[ In f269ae046 the calls to update_cfs_rq_blocked_load() were amortized
and the separate update in {en,de}queue_entity_load_avg() were
removed. ]


>
>
>
> ---
> Subject: sched: Ensure update_cfs_shares() is called for parents of continuously-running tasks
> From: Max Hailperin <max@...tavus.edu>
>
> We typically update a task_group's shares within the dequeue/enqueue
> path.  However, continuously running tasks sharing a CPU are not
> subject to these updates as they are only put/picked.  Unfortunately,
> when we reverted f269ae046 (in 17bc14b7), we lost the augmenting
> periodic update that was supposed to account for this; resulting in a
> potential loss of fairness.
>
> To fix this, re-introduce the explicit update in
> update_cfs_rq_blocked_load() [called via entity_tick()].
>
> Cc: stable@...nel.org
> Reviewed-by: Paul Turner <pjt@...gle.com>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> ---
>  kernel/sched/fair.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1531,6 +1531,7 @@ static void update_cfs_rq_blocked_load(s
>         }
>
>         __update_cfs_rq_tg_load_contrib(cfs_rq, force_update);
> +       update_cfs_shares(cfs_rq);
>  }
>
>  static inline void update_rq_runnable_avg(struct rq *rq, int runnable)
--
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