From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487Ab3F0Iy4 (ORCPT ); Thu, 27 Jun 2013 04:54:56 -0400 Received: from mx0.aculab.com ([213.249.233.131]:53014 "HELO mx0.aculab.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753262Ab3F0Iyw convert rfc822-to-8bit (ORCPT ); Thu, 27 Jun 2013 04:54:52 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT Subject: RE: [PATCH v2 15/45] rcu: Use get/put_online_cpus_atomic() to prevent CPU offline Date: Thu, 27 Jun 2013 09:54:41 +0100 Message-ID: In-Reply-To: <51CB3159.8000509@linux.vnet.ibm.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-topic: [PATCH v2 15/45] rcu: Use get/put_online_cpus_atomic() to prevent CPU offline thread-index: Ac5ympKrkc7SHUweQxex3RwLfAPpSAAdzsqg References: <20130625202452.16593.22810.stgit@srivatsabhat.in.ibm.com> <20130625202755.16593.67819.stgit@srivatsabhat.in.ibm.com> <20130625220026.GG3828@linux.vnet.ibm.com> <51CAF624.6060004@linux.vnet.ibm.com> <20130626143424.GN3828@linux.vnet.ibm.com> <1372258271.18733.256.camel@gandalf.local.home> <20130626152148.GA4405@mtj.dyndns.org> <51CB3159.8000509@linux.vnet.ibm.com> From: "David Laight" To: "Srivatsa S. Bhat" , "Tejun Heo" Cc: "Steven Rostedt" , , , , , , , , , , , , , , , , , , , , , , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >>> It would also increase the latency of CPU-hotunplug operations. > >> > >> Is that a big deal? > > > > I thought that was the whole deal with this patchset - making cpu > > hotunplugs lighter and faster mostly for powersaving. That said, just > > removing stop_machine call would be a pretty good deal and I don't > > know how meaningful reducing CPU hotunplug latency is. Srivatsa? > > > > Keeping the hotunplug latency is important for suspend/resume, where > we take all non-boot CPUs in a loop. That's an interesting use-case > where intrusiveness doesn't matter much, but latency does. So yes, > making CPU hotplug faster is also one of the goals of this patchset. If you are removing all but one of the cpu, the you only need one rcu cycle (remove everything from the list first). I'd also guess that you can't suspend a cpu until you can sleep the process that is running on it - so if a process has pre-emption disabled you aren't going to complete suspend until the process sleeps (this wouldn't be true if you suspended the cpu with its current stack - but if suspend is removing the non-boot cpus first it must be doing so from the scheduler idle loop). If you are doing suspend for aggressive power saving, then all the processes (and processors) will already be idle. However you probably wouldn't want the memory accesses to determine this on a large NUMA system with 1024+ processors. David