From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754643AbbFWLU6 (ORCPT ); Tue, 23 Jun 2015 07:20:58 -0400 Received: from casper.infradead.org ([85.118.1.10]:56823 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753370AbbFWLUu (ORCPT ); Tue, 23 Jun 2015 07:20:50 -0400 Date: Tue, 23 Jun 2015 13:20:41 +0200 From: Peter Zijlstra To: Oleg Nesterov Cc: paulmck@linux.vnet.ibm.com, tj@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, der.herr@hofr.at, dave@stgolabs.net, riel@redhat.com, viro@ZenIV.linux.org.uk, torvalds@linux-foundation.org Subject: Re: [RFC][PATCH 12/13] stop_machine: Remove lglock Message-ID: <20150623112041.GF18673@twins.programming.kicks-ass.net> References: <20150622121623.291363374@infradead.org> <20150622122256.765619039@infradead.org> <20150622222152.GA4460@redhat.com> <20150623100932.GB3644@twins.programming.kicks-ass.net> <20150623105548.GE18673@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150623105548.GE18673@twins.programming.kicks-ass.net> 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 Tue, Jun 23, 2015 at 12:55:48PM +0200, Peter Zijlstra wrote: > On Tue, Jun 23, 2015 at 12:09:32PM +0200, Peter Zijlstra wrote: > > We can of course slap a percpu-rwsem in, but I wonder if there's > > anything smarter we can do here. > > Urgh, we cannot use percpu-rwsem here, because that would require > percpu_down_write_trylock(), and I'm not sure we can get around the > sync_sched() for that. > > Now try_stop_cpus(), which requires the down_write_trylock() is used to > implement synchronize_sched_expedited(). > > Using sync_sched() to implement sync_sched_expedited would make me > happy, but it does somewhat defeat the purpose. Paul, why does this use stop_machine anyway? I seemed to remember you sending resched IPIs around. The rcu_sched_qs() thing would set passed_quiesce, which you can then collect to gauge progress. Shooting IPIs around is bad enough, but running a full blown stop_machine is really blunt and heavy. Also, OMFG @ 74b51ee152b6 ("ACPI / osl: speedup grace period in acpi_os_map_cleanup"), that's an expedited use to help the nVidiot binary blob. WTF!!