From patchwork Tue Jan 29 10:39:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 14332 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 DB3AB23EAD for ; Tue, 29 Jan 2013 10:39:20 +0000 (UTC) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by fiordland.canonical.com (Postfix) with ESMTP id 95C50A18260 for ; Tue, 29 Jan 2013 10:39:20 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id ft2so161272vbb.23 for ; Tue, 29 Jan 2013 02:39:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=XFKxQTbGSyXi92NW2Z5HKtdGO57ZXh279K7tvWGYkcM=; b=ZaG4E4Qau6XuzevvV5Boy5of3MnwRpFt/qwi6XJpLjyTkpCvKD4DnQwJkpvCT7axvp bBpBbb0huaZJMn9vv9yAlx4YlfMD7yWTgevOcGWhzaW8OrIWfrpMDe42sJ80LWfIs/q2 JBGvycgDABl7iAr1L5Tr1nqGgyHhWFLy5ttC1wgsne7JfbnKNqJevHfdfK1vCF50m5MP V2PyLYQQhCO4YjBxh9+3/ZPqa2kuO7F0wQ/Q4uhBu/tgvMrvJd/+X5HDLIIS6MfPe344 oSte4W0S80jPrIcLqadS2KXV+oJC5nKeGpptqCJErbKLBuJw4hopjlnzBSRXJtBdUSB8 /XnQ== X-Received: by 10.52.18.148 with SMTP id w20mr415268vdd.8.1359455960100; Tue, 29 Jan 2013 02:39:20 -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.58.145.101 with SMTP id st5csp129105veb; Tue, 29 Jan 2013 02:39:19 -0800 (PST) X-Received: by 10.180.93.41 with SMTP id cr9mr1399966wib.19.1359455958042; Tue, 29 Jan 2013 02:39:18 -0800 (PST) Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by mx.google.com with ESMTPS id u5si4306212wju.106.2013.01.29.02.39.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 02:39:18 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=74.125.82.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.53 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) smtp.mail=vincent.guittot@linaro.org Received: by mail-wg0-f53.google.com with SMTP id fn15so182733wgb.8 for ; Tue, 29 Jan 2013 02:39:17 -0800 (PST) X-Received: by 10.180.80.230 with SMTP id u6mr1390802wix.20.1359455957641; Tue, 29 Jan 2013 02:39:17 -0800 (PST) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id s8sm2446440wif.9.2013.01.29.02.39.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 02:39:17 -0800 (PST) From: Vincent Guittot To: linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, peterz@infradead.org, mingo@kernel.org, fweisbec@gmail.com Cc: Vincent Guittot Subject: [PATCH v2 2/2] sched: fix update NOHZ_IDLE flag Date: Tue, 29 Jan 2013 11:39:00 +0100 Message-Id: <1359455940-1710-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359455940-1710-1-git-send-email-vincent.guittot@linaro.org> References: <1359455940-1710-1-git-send-email-vincent.guittot@linaro.org> X-Gm-Message-State: ALoCoQmGkHEujiOMm+eeVEuNah5Wyx43tIrTlbdClxUMgUck2LXlvwH0MdnoOeWZapkwkCob28gV The function nohz_kick_needed modifies NOHZ_IDLE flag that is used to update the nr_busy_cpus of the sched_group. When the sched_domain are updated (during the boot or because of the unplug of a CPUs as an example) a null_domain is attached to CPUs. We have to test likely(!on_null_domain(cpu) first in order to detect such intialization step and to not modify the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5eea870..dac2edf 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5695,7 +5695,7 @@ void trigger_load_balance(struct rq *rq, int cpu) likely(!on_null_domain(cpu))) raise_softirq(SCHED_SOFTIRQ); #ifdef CONFIG_NO_HZ - if (nohz_kick_needed(rq, cpu) && likely(!on_null_domain(cpu))) + if (likely(!on_null_domain(cpu)) && nohz_kick_needed(rq, cpu)) nohz_balancer_kick(cpu); #endif }