From patchwork Mon Dec 3 12:26:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 13333 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 124C823E2A for ; Mon, 3 Dec 2012 12:27:06 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id ABFC1A18205 for ; Mon, 3 Dec 2012 12:27:05 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so1984010iag.11 for ; Mon, 03 Dec 2012 04:27:05 -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:in-reply-to:references :x-gm-message-state; bh=HWR0T2uKbksXFyxYRG/s1vlYqvm5L2OhBhK3XZIFAng=; b=Es8JINw7Wy25zDENBty/xOOwc/ccDAx1WNx8kKRwgrGfUGT4LRfh1moDqOsbbHEUDg v7QkEu02bMyEX2fboaVShWtiiQR3zGEP15NefWATNZ/6vB1t6lL8ZNj4BW9RTlBZhsH0 jalS4r4pkjtrP9JPz83KK+5MuDSb2wn1uVoE8gZxBavxR7C2SXjxYo1wiIIw/iDKeVst Mivc/56KKAwPuaoNWyhrk+fTjB4fwWoS10eajRdD9kFydUbLzjGMkddlgp+ekBFzRRLx d3Uama78XM3mj4UDDLoR5jKkhinDe2wrua+2Rlcvlpnc0z0VJXTifuZZgLFv3OThMTIN iVLg== Received: by 10.50.91.195 with SMTP id cg3mr5816627igb.57.1354537625091; Mon, 03 Dec 2012 04:27:05 -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 n20csp133575igt; Mon, 3 Dec 2012 04:27:04 -0800 (PST) Received: by 10.180.76.203 with SMTP id m11mr9244048wiw.6.1354537624026; Mon, 03 Dec 2012 04:27:04 -0800 (PST) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id en6si8117615wid.30.2012.12.03.04.27.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 04:27:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.169 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=209.85.212.169; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.169 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-wi0-f169.google.com with SMTP id hq12so1250962wib.2 for ; Mon, 03 Dec 2012 04:27:03 -0800 (PST) Received: by 10.180.102.2 with SMTP id fk2mr9235590wib.10.1354537623476; Mon, 03 Dec 2012 04:27:03 -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 w5sm12317990wiz.10.2012.12.03.04.27.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 04:27:02 -0800 (PST) From: Vincent Guittot To: linux-kernel@vger.kernel.org, linaro-dev@lists.linaro.org, peterz@infradead.org, mingo@kernel.org Cc: ccross@android.com, Vincent Guittot Subject: [PATCH Resend 3/3] sched: fix update NOHZ_IDLE flag Date: Mon, 3 Dec 2012 13:26:28 +0100 Message-Id: <1354537588-25831-4-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1354537588-25831-1-git-send-email-vincent.guittot@linaro.org> References: <1354537588-25831-1-git-send-email-vincent.guittot@linaro.org> X-Gm-Message-State: ALoCoQlewVM2aAvVhnzZEDJQzJVp6+ss+EtKVzm5nIkrAgWkCyaWa/7BM3S0sJlbQIA43U9R/YGh 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 (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 24a5588..1ef57a8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6311,7 +6311,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 }