From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966198AbdDSQ3v (ORCPT ); Wed, 19 Apr 2017 12:29:51 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:33963 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937981AbdDSQ3s (ORCPT ); Wed, 19 Apr 2017 12:29:48 -0400 From: Vincent Guittot To: mingo@kernel.org, linux-kernel@vger.kernel.org Cc: dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, yuyang.du@intel.com, pjt@google.com, bsegall@google.com, Vincent Guittot Subject: [PATCH 0/2] sched/cfs: make util/load_avg stable Date: Wed, 19 Apr 2017 18:29:28 +0200 Message-Id: <1492619370-29246-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the current implementation of load/util_avg, we assume that the ongoing time segment has fully elapsed and util/load_sum is divided by LOAD_AVG_MAX, even if part of the time segment still remains to run . As a consequence, this remaining part is considered as idle time and generates unexpected variations of util_avg of a busy CPU in the range ]1002..1024[ whereas util_avg should stay at 1023. The 1st patch implements Peter's proposal to remove the contribution of the current time segment when computing the util/load_avg. The 2nd one keeps using the current segment but update the max value instead. Both solutions make load/util_avg being stable with the advantage of using the most up to date value for the 2nd patch. I have split it into 2 patches to show the 2 versions but if the 2nd patch looks ok, we should probably squashed them into one. Vincent Guittot (2): sched/cfs: make util/load_avg more stable sched/cfs: take into account current segment kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4