From patchwork Wed Jan 22 07:45:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 23485 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B68D3218DC for ; Wed, 22 Jan 2014 07:46:46 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id le5sf53192vcb.3 for ; Tue, 21 Jan 2014 23:46:45 -0800 (PST) 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=RUZSoy3V/AKDgs2Zwq06xnLbPFwZjdDcVpHwiLuhSKI=; b=kRy4RjhB9Pa/JuaUL57uo50f+IekfcE1VAiOfDbeVv8n4FThnMR8MPN1u2O+XTz07T vqXgUvaTpvTmjTVSEZ0Dk4B4OvEi05i1S1NOYhbE+hj1L4moAepIr+BBlEJwECzhlYpa UPpOcC3l9rQTkLfIBKOYpESQFwgkuXFnZk5Ge+AW8ZrKP63qCR2UFYNyU23eY+ee5bQF wnX+/2mC054eUqNcGPVKPsCd5ltQOmGgZCUAGwJoA+/nQheFlGVnEG3xv0/vU0QoLim4 EPaiyKE32RRl0M2J8H+kskg+n0jVuJCHIkNQC34VdYLzUEA1iOf3lrXBlBf7w2yhoxJC 2ReA== X-Gm-Message-State: ALoCoQlKTF6izTrTpcm0bExXaEb22ja1lQ3e9Ja9iu/PxYqLdImrJMCcRLA22zFNGXFx0ER08CN7 X-Received: by 10.236.121.195 with SMTP id r43mr21871yhh.44.1390376805907; Tue, 21 Jan 2014 23:46:45 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.47.48 with SMTP id a16ls9500qen.26.gmail; Tue, 21 Jan 2014 23:46:45 -0800 (PST) X-Received: by 10.58.106.134 with SMTP id gu6mr32197veb.44.1390376805797; Tue, 21 Jan 2014 23:46:45 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id u8si4010078vcz.76.2014.01.21.23.46.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 23:46:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so16807vbb.27 for ; Tue, 21 Jan 2014 23:46:45 -0800 (PST) X-Received: by 10.58.202.8 with SMTP id ke8mr14937vec.80.1390376805722; Tue, 21 Jan 2014 23:46:45 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp167499vcz; Tue, 21 Jan 2014 23:46:45 -0800 (PST) X-Received: by 10.195.13.164 with SMTP id ez4mr35262wjd.11.1390376804321; Tue, 21 Jan 2014 23:46:44 -0800 (PST) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id qa8si5749766wic.27.2014.01.21.23.46.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 23:46:44 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.48 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id x13so27010wgg.3 for ; Tue, 21 Jan 2014 23:46:43 -0800 (PST) X-Received: by 10.180.90.79 with SMTP id bu15mr1518033wib.33.1390376803885; Tue, 21 Jan 2014 23:46:43 -0800 (PST) Received: from lmenx30s.lme.st.com (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPSA id gd5sm16843623wic.0.2014.01.21.23.46.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 23:46:42 -0800 (PST) From: Vincent Guittot To: peterz@infradead.org, linux-kernel@vger.kernel.org Cc: mingo@kernel.org, pjt@google.com, bsegall@google.com, alex.shi@linaro.org, linaro-kernel@lists.linaro.org, Vincent Guittot Subject: [PATCH] Revert "sched: Fix sleep time double accounting in enqueue entity" Date: Wed, 22 Jan 2014 08:45:34 +0100 Message-Id: <1390376734-6800-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vincent.guittot@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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 e64b079..6d61f20 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2365,13 +2365,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 */