From patchwork Fri Oct 21 16:57:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 4788 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 B1C8723DEF for ; Fri, 21 Oct 2011 16:57:51 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id A788CA182E2 for ; Fri, 21 Oct 2011 16:57:51 +0000 (UTC) Received: by eyg5 with SMTP id 5so5275951eyg.11 for ; Fri, 21 Oct 2011 09:57:51 -0700 (PDT) Received: by 10.223.17.3 with SMTP id q3mr25896038faa.28.1319216271448; Fri, 21 Oct 2011 09:57:51 -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.152.1.71 with SMTP id 7cs22948lak; Fri, 21 Oct 2011 09:57:51 -0700 (PDT) Received: by 10.216.137.102 with SMTP id x80mr6086020wei.109.1319216270924; Fri, 21 Oct 2011 09:57:50 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id m11si3709225wbh.66.2011.10.21.09.57.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Oct 2011 09:57:50 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) smtp.mail=vincent.guittot@linaro.org Received: by wwi18 with SMTP id 18so5986045wwi.31 for ; Fri, 21 Oct 2011 09:57:50 -0700 (PDT) Received: by 10.216.156.204 with SMTP id m54mr5751632wek.27.1319216270320; Fri, 21 Oct 2011 09:57:50 -0700 (PDT) Received: from localhost.localdomain (pas72-1-88-161-60-229.fbx.proxad.net. [88.161.60.229]) by mx.google.com with ESMTPS id y10sm22829521wbm.14.2011.10.21.09.57.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Oct 2011 09:57:49 -0700 (PDT) From: Vincent Guittot To: linaro-dev@lists.linaro.org Cc: patches@linaro.org, Vincent Guittot Subject: [RFC PATCH 11/11] sched: nohz_idle_balance Date: Fri, 21 Oct 2011 18:57:41 +0200 Message-Id: <1319216261-2781-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.4.1 clear rq->nohz_balance_kick before returning if idle equals CPU_IDLE, we return and could let nohz_balance_kick set rq->nohz_balance_kick is tested in nohz_balancer_kick before triggering a SOFTIRQ on the ilb. If this_rq->nohz_balance_kick stay to 1, the ilb will no be triggered until it wakes up and performs a normal load_balance which will clear the nohz_balance_kick Signed-off-by: Vincent Guittot --- kernel/sched_fair.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 3961876..044ffcc 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -3985,8 +3985,10 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle) struct rq *rq; int balance_cpu; - if (idle != CPU_IDLE || !this_rq->nohz_balance_kick) + if (idle != CPU_IDLE || !this_rq->nohz_balance_kick) { + this_rq->nohz_balance_kick = 0; return; + } for_each_cpu(balance_cpu, nohz.idle_cpus_mask) { if (balance_cpu == this_cpu)