From patchwork Thu Aug 30 21:05:43 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: 11075 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 1B7E623E52 for ; Thu, 30 Aug 2012 21:13:52 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 83D64A192C9 for ; Thu, 30 Aug 2012 21:13:15 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so3685139iaf.11 for ; Thu, 30 Aug 2012 14:13:51 -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-ibm-iss-spamdetectors :x-ibm-iss-detailinfo:x-gm-message-state; bh=sqlH1nJ8jQ9gsrROAZpPdnMLclIL4c1/achJpfuHzwg=; b=QDJzpG7UkYcXpNcujAD07hGAQeCgQHoqaL++edsSe1zd7CP1ePnvIBMaG+MQLvBpWv WWJV+fzeFWW8n5dcRXpmasxnmFnnKnJV5TNGwkUeoYHldpx1vY7ncjpcvSapw+POYF78 4tJ0Lpkx/oUKNN5C3WuuMWEaIhxKOhtoItolDjWxr1HpaeewXLYXW5/xsZOLIpZAL4qP DAEmgN9zRYNDm503P1LZ0bmDb0G94ki1jFdZ4jQbU1fyAFOUNz99zBwCcF8tdtcE1MY6 s6WUfMQzdprmxyy1Mmk2U7RJQQ5JnryPtQQ3/UdFXN1TGV9fP6LuUqa24hp4GiF9gZuo 5Plw== Received: by 10.42.60.139 with SMTP id q11mr6293025ich.53.1346361231580; Thu, 30 Aug 2012 14:13:51 -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.184.232 with SMTP id ex8csp31626igc; Thu, 30 Aug 2012 14:13:51 -0700 (PDT) Received: by 10.50.34.137 with SMTP id z9mr2533916igi.5.1346361231266; Thu, 30 Aug 2012 14:13:51 -0700 (PDT) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com. [32.97.182.143]) by mx.google.com with ESMTPS id mb3si2475006igc.68.2012.08.30.14.13.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Aug 2012 14:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.143 as permitted sender) client-ip=32.97.182.143; Authentication-Results: mx.google.com; spf=pass (google.com: domain of paulmck@linux.vnet.ibm.com designates 32.97.182.143 as permitted sender) smtp.mail=paulmck@linux.vnet.ibm.com Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Aug 2012 17:13:50 -0400 Received: from d01dlp01.pok.ibm.com (9.56.250.166) by e3.ny.us.ibm.com (192.168.1.103) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 30 Aug 2012 17:13:49 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 8F34F38C8039; Thu, 30 Aug 2012 17:13:48 -0400 (EDT) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7ULDlO9133016; Thu, 30 Aug 2012 17:13:48 -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 q7ULDZcO009342; Thu, 30 Aug 2012 15:13:42 -0600 Received: from paulmck-ThinkPad-W500 (sig-9-65-153-225.mts.ibm.com [9.65.153.225]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q7ULDYlE009164; Thu, 30 Aug 2012 15:13:34 -0600 Received: by paulmck-ThinkPad-W500 (Postfix, from userid 1000) id C257FEA853; Thu, 30 Aug 2012 14:05:47 -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, eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu, patches@linaro.org, "Paul E. McKenney" , "Paul E. McKenney" Subject: [PATCH tip/core/rcu 26/26] ia64: Add missing RCU idle APIs on idle loop Date: Thu, 30 Aug 2012 14:05:43 -0700 Message-Id: <1346360743-3628-26-git-send-email-paulmck@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.8 In-Reply-To: <1346360743-3628-1-git-send-email-paulmck@linux.vnet.ibm.com> References: <20120830210520.GA2824@linux.vnet.ibm.com> <1346360743-3628-1-git-send-email-paulmck@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12083021-8974-0000-0000-00000CC12CAD X-IBM-ISS-SpamDetectors: X-IBM-ISS-DetailInfo: BY=3.00000293; HX=3.00000196; KW=3.00000007; PH=3.00000001; SC=3.00000007; SDB=6.00169890; UDB=6.00038516; UTC=2012-08-30 21:13:50 X-Gm-Message-State: ALoCoQkHUINCC9gULYezm73+m7eHvq4eB57bZt99eGd+5ls0eCc6j5UDbG3bu0Yzpcea4vvtI/Dl From: "Paul E. McKenney" Traditionally, the entire idle task served as an RCU quiescent state. But when RCU read side critical sections started appearing within the idle loop, this traditional strategy became untenable. The fix was to create new RCU APIs named rcu_idle_enter() and rcu_idle_exit(), which must be called by each architecture's idle loop so that RCU can tell when it is safe to ignore a given idle CPU. Unfortunately, this fix was never applied to ia64, a shortcoming remedied by this commit. Reported by: Tony Luck Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney Tested by: Tony Luck Reviewed-by: Josh Triplett --- arch/ia64/kernel/process.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index dd6fc14..3e316ec 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -279,6 +280,7 @@ cpu_idle (void) /* endless idle loop with no priority at all */ while (1) { + rcu_idle_enter(); if (can_do_pal_halt) { current_thread_info()->status &= ~TS_POLLING; /* @@ -309,6 +311,7 @@ cpu_idle (void) normal_xtp(); #endif } + rcu_idle_exit(); schedule_preempt_disabled(); check_pgt_cache(); if (cpu_is_offline(cpu))