From patchwork Tue Oct 30 16:54:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 12604 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 EAD2823F58 for ; Tue, 30 Oct 2012 16:55:18 +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 99396A18941 for ; Tue, 30 Oct 2012 16:55:18 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so695891iej.11 for ; Tue, 30 Oct 2012 09:55:18 -0700 (PDT) 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-content-scanned:x-cbid:x-gm-message-state; bh=65KzYe5t8nZ7uCa9FxEQjlNV0Dd4W0szB0IAYsefUr0=; b=QhSPHEBi/zaS1Qvo7zGpQ4OTSmUKhJtYO1m6nwgMTP+UM7UtIcxD+FJCoDlvpfUtJA kLLe5teBdChJe3o+dNZ2LTiz3aTMfsxX3irbD4X/yMsYLNUBmUB2fFkfy3u2T2WLzlXG nrXUGGigG2wDJ9qgewwNBk6CQZ/7u6lCh7eAl1a/geT5BfzyWeu1TXcrz7wsylFWCZA9 +SJdcTuZn3uZboclIFnsvYc4r/9dQ4A5sRouKVYHKuiXzso++oI2kACDBKPXlaxc1iXr fHgcFlaKy/hOBYGqFqztMt6OmhXqguM7LARLnUZI7LVtjrUrI3+elkIqCKkFwutpOqnq qfQQ== Received: by 10.50.47.165 with SMTP id e5mr1660867ign.57.1351616118354; Tue, 30 Oct 2012 09:55:18 -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.50.67.148 with SMTP id n20csp449923igt; Tue, 30 Oct 2012 09:55:18 -0700 (PDT) Received: by 10.50.160.138 with SMTP id xk10mr2127500igb.38.1351616117900; Tue, 30 Oct 2012 09:55:17 -0700 (PDT) Received: from e4.ny.us.ibm.com (e4.ny.us.ibm.com. [32.97.182.144]) by mx.google.com with ESMTPS id xv10si9931515igb.8.2012.10.30.09.55.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 09:55:17 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.144 as permitted sender) client-ip=32.97.182.144; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.144 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Oct 2012 12:55:12 -0400 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e4.ny.us.ibm.com (192.168.1.104) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 30 Oct 2012 12:54:49 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id A837D38C8072; Tue, 30 Oct 2012 12:54:45 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9UGsicr215788; Tue, 30 Oct 2012 12:54:45 -0400 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9UGsdxS028355; Tue, 30 Oct 2012 10:54:41 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-65-77-17.mts.ibm.com [9.65.77.17]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q9UGsbxR028145; Tue, 30 Oct 2012 10:54:38 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id 9933BE4D77; Tue, 30 Oct 2012 09:54:37 -0700 (PDT) From: "Paul E. McKenney" To: linux-kernel@vger.kernel.org Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca, josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, Valdis.Kletnieks@vt.edu, dhowells@redhat.com, edumazet@google.com, darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 2/7] rcu: Make rcutorture give diagnostics if CPU offline fails Date: Tue, 30 Oct 2012 09:54:31 -0700 Message-Id: <1351616076-25617-2-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1351616076-25617-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20121030165415.GA25438@linux.vnet.ibm.com> <1351616076-25617-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12103016-3534-0000-0000-00000E5E1224 X-Gm-Message-State: ALoCoQnx/hkkhNqHP0ZxRwDezKhIvumdfk4H20Iw2VsxZ235Ff/HvDy9ri2mX29ItX0AgQe9pFwi From: "Paul E. McKenney" This commit causes rcutorture to print the errno if cpu_down() fails when the rcutorture "verbose" module parameter is specified. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- kernel/rcutorture.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index aaa7b9f..9900f56 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -1502,6 +1502,7 @@ rcu_torture_onoff(void *arg) unsigned long delta; int maxcpu = -1; DEFINE_RCU_RANDOM(rand); + int ret; unsigned long starttime; VERBOSE_PRINTK_STRING("rcu_torture_onoff task started"); @@ -1522,7 +1523,13 @@ rcu_torture_onoff(void *arg) torture_type, cpu); starttime = jiffies; n_offline_attempts++; - if (cpu_down(cpu) == 0) { + ret = cpu_down(cpu); + if (ret) { + if (verbose) + pr_alert("%s" TORTURE_FLAG + "rcu_torture_onoff task: offline %d failed: errno %d\n", + torture_type, cpu, ret); + } else { if (verbose) pr_alert("%s" TORTURE_FLAG "rcu_torture_onoff task: offlined %d\n",