From patchwork Mon Jun 30 11:50:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 32700 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 249FC203C0 for ; Mon, 30 Jun 2014 11:56:02 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id i13sf15624617qae.3 for ; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ENR1KcpfvroMpVg8JOEVsf8nbcZpgGpYiJ9sjA3SzB8=; b=XAXpsAXgmDHx9X3pMJ4rgxGSAflOkpmXsLfgKaI1a9DdbTAaZICvpuqqTLObVnVF94 6x6FfLlLvxOppT0dlTI0I+hZCHX67o46MOUgQPGAQBHNnmoefx7iZ0cIdTq3kPjTTS9N u3bDcCIStL1kHrxmMOWQBkfu9JE0e9OZYMGcKuUhWRnI+EtVn0ULw2OtrmIBVuAOGXFq 3LBh3HqbO6Y1PlHGM7lr46veIacZ4ryqaaqdwYIJFU/BmGcry0RCBYl3ye8hfwalaYhH 8TMnkHGl5EGCqCUDl4yFZPPDEzVixfU4w82R4oPv9JVrTiE4puSAlydOlTEQqEFUUKo1 2rRQ== X-Gm-Message-State: ALoCoQna8xA1xbjUMz2oM/k/1yMusGSuoI62W5wp3eas2GJOenyhfGmYGv2wH60w/EYmLzRAgVZS X-Received: by 10.236.142.20 with SMTP id h20mr316360yhj.12.1404129362860; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.225 with SMTP id o88ls1425813qge.88.gmail; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) X-Received: by 10.58.150.100 with SMTP id uh4mr38532195veb.30.1404129362758; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id zu9si9892141vdc.75.2014.06.30.04.56.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Jun 2014 04:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id im17so7461923vcb.11 for ; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) X-Received: by 10.220.167.2 with SMTP id o2mr37882141vcy.8.1404129362654; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp131309vcb; Mon, 30 Jun 2014 04:56:02 -0700 (PDT) X-Received: by 10.66.139.164 with SMTP id qz4mr8219092pab.151.1404129361901; Mon, 30 Jun 2014 04:56:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id co3si22831843pad.238.2014.06.30.04.56.01; Mon, 30 Jun 2014 04:56:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755466AbaF3LzR (ORCPT + 27 others); Mon, 30 Jun 2014 07:55:17 -0400 Received: from ip4-83-240-18-248.cust.nbox.cz ([83.240.18.248]:52076 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbaF3Lx0 (ORCPT ); Mon, 30 Jun 2014 07:53:26 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.80.1) (envelope-from ) id 1X1a9C-0000WI-Mz; Mon, 30 Jun 2014 13:53:22 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Vincent Guittot , Peter Zijlstra , pjt@google.com, alex.shi@linaro.org, Ingo Molnar , Jiri Slaby Subject: [PATCH 3.12 001/181] Revert "sched: Fix sleep time double accounting in enqueue entity" Date: Mon, 30 Jun 2014 13:50:22 +0200 Message-Id: <61844d8e25eb8899b0836afa9796fa239db80f1f.1404128997.git.jslaby@suse.cz> X-Mailer: git-send-email 2.0.0 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.180 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Vincent Guittot 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 9390675af0835ae1d654d33bfcf16096028550ad upstream. This reverts commit 282cf499f03ec1754b6c8c945c9674b02631fb0f. With the current implementation, the load average statistics of a sched entity change according to other activity on the CPU even if this activity is done between the running window of the sched entity and have no influence on the running duration of the task. When a task wakes up on the same CPU, we currently update last_runnable_update with the return of __synchronize_entity_decay without updating the runnable_avg_sum and runnable_avg_period accordingly. In fact, we have to sync the load_contrib of the se with the rq's blocked_load_contrib before removing it from the latter (with __synchronize_entity_decay) but we must keep last_runnable_update unchanged for updating runnable_avg_sum/period during the next update_entity_load_avg. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra Reviewed-by: Ben Segall Cc: pjt@google.com Cc: alex.shi@linaro.org Link: http://lkml.kernel.org/r/1390376734-6800-1-git-send-email-vincent.guittot@linaro.org Signed-off-by: Ingo Molnar Signed-off-by: Jiri Slaby --- kernel/sched/fair.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 790e2fc808da..25658d2c68d0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1579,13 +1579,7 @@ static inline void enqueue_entity_load_avg(struct cfs_rq *cfs_rq, } wakeup = 0; } else { - /* - * Task re-woke on same cpu (or else migrate_task_rq_fair() - * would have made count negative); we must be careful to avoid - * double-accounting blocked time after synchronizing decays. - */ - se->avg.last_runnable_update += __synchronize_entity_decay(se) - << 20; + __synchronize_entity_decay(se); } /* migrated tasks did not contribute to our blocked load */