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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141016203119.GM7369@worktop.fdxtended.com>
Date:	Thu, 16 Oct 2014 22:31:19 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Kirill Tkhai <ktkhai@...allels.com>
Cc:	linux-kernel@...r.kernel.org, Oleg Nesterov <oleg@...hat.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] sched/fair: Fix race in update_cfs_rq_h_load()

On Thu, Oct 16, 2014 at 05:49:19PM +0400, Kirill Tkhai wrote:
> 
> The original idea of cfs_rq::last_h_load_update was to do not
> update cfs_rq::h_load more than once a jiffies.
> 
> Since task_numa_compare()->task_h_load()->update_cfs_rq_h_load()
> makes unlocked update, this may be a reason of race between two
> parallel updates, or with remote rq->curr changing.
> 
> The patch does not change idea, but it excludes the race. Now we
> update cfs_rq::h_load holding rq's lock. This happens in two
> places: every jiffie in task_tick_fair(), and in set_curr_task_fair()
> when task becomes fair.

But why is this a problem? Most of the load balance code is racy like
hell -- purposely so, added serialization is typically worse.
--
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