[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170209121458.GC6500@twins.programming.kicks-ass.net>
Date: Thu, 9 Feb 2017 13:14:58 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Uladzislau Rezki <urezki@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Uladzislau 2 Rezki <uladzislau2.rezki@...ymobile.com>
Subject: Re: [RFC,v2 1/3] sched: set loop_max after rq lock is taken
On Wed, Feb 08, 2017 at 09:43:27AM +0100, Uladzislau Rezki wrote:
> From: Uladzislau 2 Rezki <uladzislau2.rezki@...ymobile.com>
>
> While doing a load balance there is a race in setting
> loop_max variable since nr_running can be changed causing
> incorect iteration loops.
>
> As a result we may skip some candidates or check the same
> tasks again.
When doing the actual migration we'll drop this lock again and
nr_running can change again.
This cannot be done perfectly, all of load-balancing is riddled with
races like this, nobody cares.
Powered by blists - more mailing lists