From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752130AbbFZMXp (ORCPT ); Fri, 26 Jun 2015 08:23:45 -0400 Received: from casper.infradead.org ([85.118.1.10]:53859 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbbFZMXj (ORCPT ); Fri, 26 Jun 2015 08:23:39 -0400 Date: Fri, 26 Jun 2015 14:23:30 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: paulmck@linux.vnet.ibm.com, tj@kernel.org, mingo@redhat.com, der.herr@hofr.at, dave@stgolabs.net, riel@redhat.com, viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/6] stop_machine: kill stop_cpus_mutex and stop_cpus_lock Message-ID: <20150626122330.GY19282@twins.programming.kicks-ass.net> References: <20150626021455.GA5675@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150626021455.GA5675@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2015 at 04:14:55AM +0200, Oleg Nesterov wrote: > Not sure. > > And note that this series kills stop_cpus_mutex, so that multiple > stop_cpus()'s / stop_machine()'s can run in parallel if cpumask's > do not overlap. > > Note also the changelog in 6/6, we can simplify + optimize this code > a bit more. > > What do you think? The problem I have with this is that it makes the better operation (stop_two_cpus) slower while improving the worse operation (stop_cpus). I would much prefer to keep stop_two_cpus() as proposed with taking two cpu_stopper::lock instances and replacing the stop_cpu_mutex with a percpu-rwsem.