From patchwork Fri Feb 8 18:05:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 14704 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 B08DA23E33 for ; Fri, 8 Feb 2013 18:06:12 +0000 (UTC) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by fiordland.canonical.com (Postfix) with ESMTP id 6BAB4A186E9 for ; Fri, 8 Feb 2013 18:06:12 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id n11so2472132vch.19 for ; Fri, 08 Feb 2013 10:06:12 -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=nYXg1KcjDdljWER/tLlXN7/enWR81gyv/Nm5BxsnGCK8+pvAghJozDmn+xyH48u+0n 0am4RzS88epdDFhiVhkhEYn4bJk8tGgVIkTYqufA28iCzOINiX9zc9BIJh2P5rhSWuUP mlyQ2n7ybeC64L/Fweu5sswZGpbqC+daBXji5rgRR96Fy9aY4t00ooxOGr9NKHU+ZSYi RGKxdV3/0xlnG4V1DRwvUVV6/cdqPadvGVNLKV+rkqTnm7rUoupCXGNI54H+W7nRORVS D1ASrH2dw+SoVRwtjYSibvbumRJtwF4f6/kRKzBossJS5Li6iRWVhDuZ7I3EBvZ44R7P 7pnw== X-Received: by 10.58.8.82 with SMTP id p18mr7803299vea.54.1360346771759; Fri, 08 Feb 2013 10:06:11 -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.252.8 with SMTP id zo8csp160637vec; Fri, 8 Feb 2013 10:06:11 -0800 (PST) X-Received: by 10.180.101.99 with SMTP id ff3mr4253778wib.21.1360346770608; Fri, 08 Feb 2013 10:06:10 -0800 (PST) Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]) by mx.google.com with ESMTPS id ba7si11609392wjb.243.2013.02.08.10.06.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 10:06:10 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::236 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=2a00:1450:400c:c03::236; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c03::236 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-we0-f182.google.com with SMTP id t57so3351547wey.13 for ; Fri, 08 Feb 2013 10:06:09 -0800 (PST) X-Received: by 10.194.75.196 with SMTP id e4mr11474684wjw.44.1360346769899; Fri, 08 Feb 2013 10:06:09 -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 s8sm15694093wif.9.2013.02.08.10.06.08 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Feb 2013 10:06:09 -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, rostedt@goodmis.org, efault@gmx.de Cc: Vincent Guittot Subject: [PATCH v3 2/2] sched: fix update NOHZ_IDLE flag Date: Fri, 8 Feb 2013 19:05:18 +0100 Message-Id: <1360346718-3313-3-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360346718-3313-1-git-send-email-vincent.guittot@linaro.org> References: <1360346718-3313-1-git-send-email-vincent.guittot@linaro.org> X-Gm-Message-State: ALoCoQnr2nPuiykj3V6xDRuFL//c8UMdYKDWD6MboWekOLfNHqffaa4bnsf8UDIdeKgJLBdmwkWK 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 }