Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965684AbdDSQNB (ORCPT ); Wed, 19 Apr 2017 12:13:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57428 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965650AbdDSQM6 (ORCPT ); Wed, 19 Apr 2017 12:12:58 -0400 Date: Wed, 19 Apr 2017 09:12:42 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, marc.zyngier@arm.com Subject: Re: [PATCH v2 tip/core/rcu 0/13] Miscellaneous fixes for 4.12 Reply-To: paulmck@linux.vnet.ibm.com References: <20170412165441.GA17149@linux.vnet.ibm.com> <20170417232714.GA19013@linux.vnet.ibm.com> <20170419112845.3rt3zlyzuzert647@hirez.programming.kicks-ass.net> <20170419130245.GJ3956@linux.vnet.ibm.com> <20170419131553.cii62nl2si3lwm7w@hirez.programming.kicks-ass.net> <20170419153703.GQ3956@linux.vnet.ibm.com> <20170419154343.osootv4bcwfppnlc@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419154343.osootv4bcwfppnlc@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17041916-0052-0000-0000-000001DDA08C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006939; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000208; SDB=6.00849667; UDB=6.00419574; IPR=6.00628300; BA=6.00005304; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015095; XFM=3.00000013; UTC=2017-04-19 16:12:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041916-0053-0000-0000-000050124AFB Message-Id: <20170419161242.GR3956@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-19_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704190134 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1634 Lines: 37 On Wed, Apr 19, 2017 at 05:43:43PM +0200, Peter Zijlstra wrote: > On Wed, Apr 19, 2017 at 08:37:03AM -0700, Paul E. McKenney wrote: > > On Wed, Apr 19, 2017 at 03:15:53PM +0200, Peter Zijlstra wrote: > > > On Wed, Apr 19, 2017 at 06:02:45AM -0700, Paul E. McKenney wrote: > > > > On Wed, Apr 19, 2017 at 01:28:45PM +0200, Peter Zijlstra wrote: > > > > > > > > > > So the thing Maz complained about is because KVM assumes > > > > > synchronize_srcu() is 'free' when there is no srcu_read_lock() activity. > > > > > This series 'breaks' that. > > > > > > > > > > I've not looked hard enough at the new SRCU to see if its possible to > > > > > re-instate that feature. > > > > > > > > And with the fix I gave Maz, the parallelized version is near enough > > > > to being free as well. It was just a stupid bug on my part: I forgot > > > > to check for expedited when scheduling callbacks. > > > > > > Right, although for the old SRCU it was true for !expedited as well. > > > > Which is all good fun until someone does a call_srcu() on each and > > every munmap() syscall. ;-) > > Well, that being a different SRCU domain doesn't affect the KVM memslot > domain thingy ;-) Other than the excessive quantities of CPU time consumed... > > But the current code is much better housebroken. ;-) > > It is. But a workload that manages to hit sync_expedited in a loop on > all CPUs is still O(n^2) work. And the more sync_expedited instances we > have, the more likely that becomes. In most cases, it shouldn't be -that- hard to loop through the CPUs and then do a single sync_expedited at the end of the loop. Thanx, Paul