From patchwork Thu Nov 8 08:03:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 12763 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0C89D23E00 for ; Thu, 8 Nov 2012 08:03:54 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 99751A1875B for ; Thu, 8 Nov 2012 08:03:53 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so3611947iej.11 for ; Thu, 08 Nov 2012 00:03:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-originalarrivaltime:x-mc-unique :content-type:content-transfer-encoding:x-gm-message-state; bh=z1VHtWKJlXqkFSQggZRC2yY2HGJ8GoUZ4qijADel/HY=; b=d8xQIwPXSBetG6LojuxlO3yl/NRVga1fCr0AgInOTFgIxbO1UCDB+wmjprNhrzIbAd zo8nuDTZ/4WCAJ+ml0G3oOh85lvQJ7yJWkbQgLtoU6sXH+wHXZgRswGas0oRuMtcXaJP oLZUftMv6aImwFh1+EV6/1Q+M9DRAreb/22sMWyhFmbdNIpcIhitZV8ffhrhkfyeND6I RA/2tt4OJH/pj+T8kVNkmUVQpj+1hTWZk4jmIf8oBtqeiLRft9ShaGO0x6j0/BEIBjfX smLoeLpAE7FlQf/9SC+DEyGm+gW3It2mukW5e4f5OY4nUj3uIlcF/QVbISPXuzbOq9gU o6qQ== Received: by 10.50.91.195 with SMTP id cg3mr19129068igb.57.1352361833006; Thu, 08 Nov 2012 00:03:53 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp336488igt; Thu, 8 Nov 2012 00:03:52 -0800 (PST) Received: by 10.216.45.144 with SMTP id p16mr2999552web.170.1352361831431; Thu, 08 Nov 2012 00:03:51 -0800 (PST) Received: from service87.mimecast.com (service87.mimecast.com. [91.220.42.44]) by mx.google.com with ESMTP id ey4si4992992wib.7.2012.11.08.00.03.50; Thu, 08 Nov 2012 00:03:51 -0800 (PST) Received-SPF: pass (google.com: domain of viresh.kumar2@arm.com designates 91.220.42.44 as permitted sender) client-ip=91.220.42.44; Authentication-Results: mx.google.com; spf=pass (google.com: domain of viresh.kumar2@arm.com designates 91.220.42.44 as permitted sender) smtp.mail=viresh.kumar2@arm.com Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 08 Nov 2012 08:03:50 +0000 Received: from localhost ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Thu, 8 Nov 2012 08:03:48 +0000 From: Viresh Kumar To: mingo@redhat.com, peterz@infradead.org Cc: linaro-dev@lists.linaro.org, patches@linaro.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH] sched/fair: Set se->vruntime directly in place_entity() Date: Thu, 8 Nov 2012 13:33:46 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e X-OriginalArrivalTime: 08 Nov 2012 08:03:49.0045 (UTC) FILETIME=[95863E50:01CDBD87] X-MC-Unique: 112110808035002401 X-Gm-Message-State: ALoCoQkRZE9BtniYVwU9BqCHhZ+Dyn2x2f8Y7eT7hinf8yVkFUlup5Sh+0Ump9Wd3Cyc1pczXbIa We are first storing the new vruntime in a variable and then storing it in se->vruntime. Simply update se->vruntime directly. Signed-off-by: Viresh Kumar --- kernel/sched/fair.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a319d56c..820a2f1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1454,9 +1454,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) } /* ensure we never gain time by being placed backwards. */ - vruntime = max_vruntime(se->vruntime, vruntime); - - se->vruntime = vruntime; + se->vruntime = max_vruntime(se->vruntime, vruntime); } static void check_enqueue_throttle(struct cfs_rq *cfs_rq);