On Thu, Feb 08, 2018 at 05:52:00PM +0100, Vincent Guittot wrote: > On 8 February 2018 at 16:44, Peter Zijlstra <pet...@infradead.org> wrote: > > On Thu, Feb 08, 2018 at 04:05:58PM +0100, Vincent Guittot wrote: > >> On 8 February 2018 at 15:00, Peter Zijlstra <pet...@infradead.org> wrote: > >> > On Tue, Feb 06, 2018 at 08:23:05PM +0100, Vincent Guittot wrote: > >> > > >> >> @@ -9207,13 +9231,15 @@ void nohz_balance_enter_idle(int cpu) > >> >> if (!housekeeping_cpu(cpu, HK_FLAG_SCHED)) > >> >> return; > >> >> > >> >> + rq->has_blocked_load = 1; > > > > Should we not set that with rq->lock held? We already clear it while > > holding rq->lock. > > I think it's safe because it is used to re-enable the periodic decay > unconditionally. > It is cleared with rq->lock held to prevents any update of the cfs_rq > *_avg while deciding if we can clear has_blocked_load
Yes, and that clearing must then have observed the new addition. But please put so in a comment.