From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934844AbcI0TY1 (ORCPT ); Tue, 27 Sep 2016 15:24:27 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:34891 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933331AbcI0TYU (ORCPT ); Tue, 27 Sep 2016 15:24:20 -0400 Date: Tue, 27 Sep 2016 20:24:04 +0100 From: Matt Fleming To: Dietmar Eggemann Cc: Vincent Guittot , Peter Zijlstra , Ingo Molnar , linux-kernel , Mike Galbraith , Yuyang Du Subject: Re: [PATCH] sched/fair: Do not decay new task load on first enqueue Message-ID: <20160927192404.GC16071@codeblueprint.co.uk> References: <20160923115808.2330-1-matt@codeblueprint.co.uk> <1774604b-1028-a4b1-a254-b2fb32cd91f1@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1774604b-1028-a4b1-a254-b2fb32cd91f1@arm.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Sep, at 02:48:31PM, Dietmar Eggemann wrote: > > I think Matt is talking about the fact that the cfs->runnable_load_avg > value is 0 once the hackbench task is initially dequeued. Yes. > Without this patch the value of se->avg.load_avg (e.g. both times 1002) > is exactly the same when we add it to cfs_rq->runnable_load_avg in > enqueue_entity_load_avg() and when we subtract it in > dequeue_entity_load_avg(). That's because the initial runtime is short > (~250us on my hikey board). > > With this patch we add 1024 and subtract ~1002 which lets > cfs_rq->runnable_load_avg still have a small positive value. This > favours that for the next hackbench task another cpu will be chosen in > (load-based) fork-balance. Bingo, that's exactly it. Sorry if i was unclear.