Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752019AbdHAIN1 (ORCPT ); Tue, 1 Aug 2017 04:13:27 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:42181 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751972AbdHAIMk (ORCPT ); Tue, 1 Aug 2017 04:12:40 -0400 Date: Tue, 1 Aug 2017 10:12:30 +0200 From: Peter Zijlstra To: Nicholas Piggin Cc: Mathieu Desnoyers , Michael Ellerman , "Paul E. McKenney" , linux-kernel , Boqun Feng , Andrew Hunter , maged michael , gromer , Avi Kivity , Benjamin Herrenschmidt , Palmer Dabbelt , Dave Watson Subject: Re: [RFC PATCH v2] membarrier: expedited private command Message-ID: <20170801081230.GF6524@worktop.programming.kicks-ass.net> References: <20170727211314.32666-1-mathieu.desnoyers@efficios.com> <20170728085532.ylhuz2irwmgpmejv@hirez.programming.kicks-ass.net> <20170728115702.5vgnvwhmbbmyrxbf@hirez.programming.kicks-ass.net> <87tw1s4u9w.fsf@concordia.ellerman.id.au> <20170731233731.32e68f6d@roar.ozlabs.ibm.com> <973223324.694.1501551189603.JavaMail.zimbra@efficios.com> <20170801120047.61c59064@roar.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170801120047.61c59064@roar.ozlabs.ibm.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 958 Lines: 20 On Tue, Aug 01, 2017 at 12:00:47PM +1000, Nicholas Piggin wrote: > Thanks for this, I'll take a look. This should be a good start as a stress > test, but I'd also be interested in some application. The reason being that > for example using runqueue locks may give reasonable maximum throughput > numbers, but could cause some latency or slowdown when it's used in more > realistic scenario. Given this is an unprivileged interface we have to consider DoS and other such lovely things. And since we cannot use mm_cpumask() we're stuck with for_each_online_cpu(). Combined that means that using rq->lock is completely out of the question, some numbnut doing 'for (;;) sys_membarrier();' can completely wreck the system. Yes, it might work for 'normal' workloads, but the interference potential is just too big. I have the same problem with Paul's synchronize_rcu_expedited() patch, that is a machine wide IPI spray and will interfere with unrelated work.