From patchwork Mon Feb 18 10:51:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa S. Bhat" X-Patchwork-Id: 2156811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2196BDF25A for ; Mon, 18 Feb 2013 10:56:42 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7OLt-0000r6-P8; Mon, 18 Feb 2013 10:53:41 +0000 Received: from e23smtp08.au.ibm.com ([202.81.31.141]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U7OLp-0000pt-3j for linux-arm-kernel@lists.infradead.org; Mon, 18 Feb 2013 10:53:39 +0000 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Feb 2013 20:51:44 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 18 Feb 2013 20:51:41 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 8AF253578051 for ; Mon, 18 Feb 2013 21:53:24 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r1IArL3i61866202 for ; Mon, 18 Feb 2013 21:53:22 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r1IArLbg028564 for ; Mon, 18 Feb 2013 21:53:23 +1100 Received: from srivatsabhat.in.ibm.com (srivatsabhat.in.ibm.com [9.124.35.204] (may be forged)) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r1IArFsD028507; Mon, 18 Feb 2013 21:53:16 +1100 Message-ID: <512207A6.4000402@linux.vnet.ibm.com> Date: Mon, 18 Feb 2013 16:21:18 +0530 From: "Srivatsa S. Bhat" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Vincent Guittot Subject: Re: [PATCH v5 00/45] CPU hotplug: stop_machine()-free CPU hotplug References: <20130122073210.13822.50434.stgit@srivatsabhat.in.ibm.com> <510FBC01.2030405@linux.vnet.ibm.com> <87haloiwv0.fsf@rustcorp.com.au> <51134596.4080106@linux.vnet.ibm.com> <20130208154113.GV17833@n2100.arm.linux.org.uk> <51152B81.2050501@linux.vnet.ibm.com> <51153F72.1060005@linux.vnet.ibm.com> <5118E2CD.90401@linux.vnet.ibm.com> <20130211190852.GA5695@linux.vnet.ibm.com> <5119BDFD.1000909@linux.vnet.ibm.com> <511E8F3C.2010406@linux.vnet.ibm.com> <512203B3.7090002@linux.vnet.ibm.com> In-Reply-To: <512203B3.7090002@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13021810-5140-0000-0000-000002C5F58A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130218_055338_724342_69BDD9BA X-CRM114-Status: GOOD ( 22.72 ) X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [202.81.31.141 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-doc@vger.kernel.org, peterz@infradead.org, fweisbec@gmail.com, linux-kernel@vger.kernel.org, walken@google.com, mingo@kernel.org, linux-arch@vger.kernel.org, Russell King - ARM Linux , xiaoguangrong@linux.vnet.ibm.com, wangyun@linux.vnet.ibm.com, paulmck@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, linux-pm@vger.kernel.org, Rusty Russell , rostedt@goodmis.org, rjw@sisk.pl, namhyung@kernel.org, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, oleg@redhat.com, sbw@mit.edu, tj@kernel.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 02/18/2013 04:04 PM, Srivatsa S. Bhat wrote: > On 02/18/2013 03:54 PM, Vincent Guittot wrote: >> On 15 February 2013 20:40, Srivatsa S. Bhat >> wrote: >>> Hi Vincent, >>> >>> On 02/15/2013 06:58 PM, Vincent Guittot wrote: >>>> Hi Srivatsa, >>>> >>>> I have run some tests with you branch (thanks Paul for the git tree) >>>> and you will find results below. >>>> >>> >>> Thank you very much for testing this patchset! >>> >>>> The tests condition are: >>>> - 5 CPUs system in 2 clusters >>>> - The test plugs/unplugs CPU2 and it increases the system load each 20 >>>> plug/unplug sequence with either more cyclictests threads >>>> - The test is done with all CPUs online and with only CPU0 and CPU2 >>>> >>>> The main conclusion is that there is no differences with and without >>>> your patches with my stress tests. I'm not sure that it was the >>>> expected results but the cpu_down is already quite low : 4-5ms in >>>> average >>>> >>> >>> Atleast my patchset doesn't perform _worse_ than mainline, with respect >>> to cpu_down duration :-) >> >> yes exactly and it has pass more than 400 consecutive plug/unplug on >> an ARM platform >> > > Great! However, did you turn on CPU_IDLE during your tests? > > In my tests, I had turned off cpu idle in the .config, like I had mentioned in > the cover letter. I'm struggling to get it working with CPU_IDLE/INTEL_IDLE > turned on, because it gets into a lockup almost immediately. It appears that > the lock-holder of clockevents_lock never releases it, for some reason.. > See below for the full log. Lockdep has not been useful in debugging this, > unfortunately :-( > Ah, nevermind, the following diff fixes it :-) I had applied this fix on v5 and tested but it still had races where I used to hit the lockups. Now after I fixed all the memory barrier issues that Paul and Oleg pointed out in v5, I applied this fix again and tested it just now - it works beautifully! :-) I'll include this fix and post a v6 soon. Regards, Srivatsa S. Bhat ---------------------------------------------------------------------------> diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 30b6de0..ca340fd 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "tick-internal.h" @@ -431,6 +432,7 @@ void clockevents_notify(unsigned long reason, void *arg) unsigned long flags; int cpu; + get_online_cpus_atomic(); raw_spin_lock_irqsave(&clockevents_lock, flags); clockevents_do_notify(reason, arg); @@ -459,6 +461,7 @@ void clockevents_notify(unsigned long reason, void *arg) break; } raw_spin_unlock_irqrestore(&clockevents_lock, flags); + put_online_cpus_atomic(); } EXPORT_SYMBOL_GPL(clockevents_notify); #endif