From patchwork Mon Dec 3 12:26:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Guittot X-Patchwork-Id: 13332 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 1339F23E2A for ; Mon, 3 Dec 2012 12:27:05 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9008EA18701 for ; Mon, 3 Dec 2012 12:27:04 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so3822720ieb.11 for ; Mon, 03 Dec 2012 04:27:04 -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=wlzjw7e/kUZE8wx4g9k3Rd3ewT2RH2yoTFtrrJ0870M=; b=dv5e+BppU0/iFXDjRbwFIgTjjCJ3J8Do2phGGh4CiiBGf71xCi+xos3k7yrhVZAKV/ 1koXmKX+VqoilKjxZ0Wp0WXPeYtTR92Sr8bDZRTvKSZ0bEE7GDsazILaAvL1c0CDrmaR RlNuvwpfN6g42IRDwF6i2QoPg9MIx3ZnA6ofaJISYYd17BKIW8bR6m2nZREKojR0jWtw 3h3+42HLMlgPfBe7CZGDKwKuyEPaDwdyukvLq3XTyacO6YIIXsAN6VMT/Rsfc8e+Dw2N HelNVOXg+OLyO+OJ6DFUTce/S7ox9u+Yoyczg0EM6/Fl5/yQtRc+AeWPgW3duiMG75QP 6LGA== Received: by 10.50.152.137 with SMTP id uy9mr5920804igb.62.1354537624364; Mon, 03 Dec 2012 04:27:04 -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 n20csp133569igt; Mon, 3 Dec 2012 04:27:03 -0800 (PST) Received: by 10.216.228.158 with SMTP id f30mr3367419weq.91.1354537622955; Mon, 03 Dec 2012 04:27:02 -0800 (PST) Received: from mail-we0-f181.google.com (mail-we0-f181.google.com [74.125.82.181]) by mx.google.com with ESMTPS id z56si8109116wen.65.2012.12.03.04.27.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 04:27:02 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.181 is neither permitted nor denied by best guess record for domain of vincent.guittot@linaro.org) client-ip=74.125.82.181; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.181 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-f181.google.com with SMTP id t11so1054760wey.40 for ; Mon, 03 Dec 2012 04:27:02 -0800 (PST) Received: by 10.180.92.71 with SMTP id ck7mr9208501wib.20.1354537622228; Mon, 03 Dec 2012 04:27:02 -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.00 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 04:27:01 -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 2/3] sched: fix init NOHZ_IDLE flag Date: Mon, 3 Dec 2012 13:26:27 +0100 Message-Id: <1354537588-25831-3-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: ALoCoQlO7mr5JCG+0Ja55QasMyaoeKtKHTrytqfXth615zsfnYdZWvcThlMtCg+R3pj8QW9R2+50 On my smp platform which is made of 5 cores in 2 clusters,I have the nr_busy_cpus field of sched_group_power struct that is not null when the platform is fully idle. The root cause seems to be: During the boot sequence, some CPUs reach the idle loop and set their NOHZ_IDLE flag while waiting for others CPUs to boot. But the nr_busy_cpus field is initialized later with the assumption that all CPUs are in the busy state whereas some CPUs have already set their NOHZ_IDLE flag. We clear the NOHZ_IDLE flag when nr_busy_cpus is initialized in order to have a coherent configuration. Signed-off-by: Vincent Guittot --- kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bae620a..77a01c8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5875,6 +5875,7 @@ static void init_sched_groups_power(int cpu, struct sched_domain *sd) update_group_power(sd, cpu); atomic_set(&sg->sgp->nr_busy_cpus, sg->group_weight); + clear_bit(NOHZ_IDLE, nohz_flags(cpu)); } int __weak arch_sd_sibling_asym_packing(void)