From patchwork Fri Jun 8 04:26:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 9171 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 5F3AE23F0F for ; Fri, 8 Jun 2012 04:27:10 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by fiordland.canonical.com (Postfix) with ESMTP id 20BD0A186E5 for ; Fri, 8 Jun 2012 04:27:10 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id un3so2128199obb.11 for ; Thu, 07 Jun 2012 21:27:09 -0700 (PDT) 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:in-reply-to:references :x-content-scanned:x-cbid:x-gm-message-state; bh=WYd7wGNPghkbsxeVR2kB2KNNTaBISYx7gaqObp6wxgw=; b=TjNZPVz9dfrXkjprhFaOdM45BoSpag6oEnIAi7bvVb9xrb7lnWaCHmSmhz7yOc0yin L1exUxgQ9WEjHT3FrvacPfJqJTcuQAn/5Xr2gxlGYtVB9f/FfK+k9OyjNH0o39j+LgfE //xXID2vxJ+7WnwSMyjIQ9/xaVO/8p+rw3KwqGueJf5YvEEF/hzX/4svc6B79DAFRKc9 l9LUTkRlzrXLeB77ldjQ2oMIeimUu/Z80+k/I1wcJOIX5pxuuwAqwOadew29MObj9ird bfwNVlHlaSMHCGdgZU2Z/cW8CtzOGY1knby7nCAlaY3ikPQroNmJyoMOEdLdup7E3laB 2CTg== Received: by 10.50.46.232 with SMTP id y8mr2401669igm.57.1339129629819; Thu, 07 Jun 2012 21:27:09 -0700 (PDT) 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.231.24.148 with SMTP id v20csp14727ibb; Thu, 7 Jun 2012 21:27:08 -0700 (PDT) Received: by 10.68.241.228 with SMTP id wl4mr16552677pbc.51.1339129628080; Thu, 07 Jun 2012 21:27:08 -0700 (PDT) Received: from e35.co.us.ibm.com (e35.co.us.ibm.com. [32.97.110.153]) by mx.google.com with ESMTPS id vr5si8799615pbc.73.2012.06.07.21.27.07 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Jun 2012 21:27:08 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.153 as permitted sender) client-ip=32.97.110.153; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.110.153 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jun 2012 22:27:07 -0600 Received: from d01dlp03.pok.ibm.com (9.56.224.17) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 7 Jun 2012 22:27:04 -0600 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id A3B11C90057; Fri, 8 Jun 2012 00:27:03 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q584R3gm199362; Fri, 8 Jun 2012 00:27:03 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q584Qxxm006650; Thu, 7 Jun 2012 22:27:01 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-65-78-192.mts.ibm.com [9.65.78.192]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q584QwTg006564; Thu, 7 Jun 2012 22:26:59 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id A1547E51EC; Thu, 7 Jun 2012 21:26:57 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH rcu 7/8] rcu: Round FAST_NO_HZ lazy timeout to nearest second Date: Thu, 7 Jun 2012 21:26:54 -0700 Message-Id: <1339129615-1795-7-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1339129615-1795-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120608042632.GA1250@linux.vnet.ibm.com> <1339129615-1795-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12060804-6148-0000-0000-00000685AAA1 X-Gm-Message-State: ALoCoQnaj46UZG8sUcUrFOYeIZxK9rkIZr0tPFfA+EKdnSKUgK9KgXATgbZ1Vw6QSOlReL3TG+rk From: "Paul E. McKenney" Currently, if several CPUs in the same package have all lazy RCU callbacks, their wakeups will be uncorrelated. If all the CPUs are in the same power domain (as is often the case), this will result in unnecessary power-ups of the package. This commit therefore uses round_jiffies() to round the timeouts to a second boundary, increasing the odds that they can be coalesced with each other or with other timeouts. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutree_plugin.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 5271a02..4451362b 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -2182,7 +2182,7 @@ static void rcu_prepare_for_idle(int cpu) jiffies + RCU_IDLE_GP_DELAY; } else { rdtp->idle_gp_timer_expires = - jiffies + RCU_IDLE_LAZY_GP_DELAY; + round_jiffies(jiffies + RCU_IDLE_LAZY_GP_DELAY); trace_rcu_prep_idle("Dyntick with lazy callbacks"); } tp = &rdtp->idle_gp_timer;