Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752238Ab3I3G5K (ORCPT ); Mon, 30 Sep 2013 02:57:10 -0400 Received: from mail-ea0-f169.google.com ([209.85.215.169]:51164 "EHLO mail-ea0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051Ab3I3G5I (ORCPT ); Mon, 30 Sep 2013 02:57:08 -0400 Date: Mon, 30 Sep 2013 08:57:03 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Davidlohr Bueso , Waiman Long , Ingo Molnar , Andrew Morton , Linux Kernel Mailing List , Rik van Riel , Peter Hurley , Davidlohr Bueso , Alex Shi , Tim Chen , Peter Zijlstra , Andrea Arcangeli , Matthew R Wilcox , Dave Hansen , Michel Lespinasse , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Subject: Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path Message-ID: <20130930065703.GB13584@gmail.com> References: <1380308424-31011-1-git-send-email-Waiman.Long@hp.com> <20130928074144.GA17773@gmail.com> <1380495986.2174.10.camel@buesod1.americas.hpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2542 Lines: 63 * Linus Torvalds wrote: > [...] > > And your numbers for Ingo's patch: > > > After testing Ingo's anon-vma rwlock_t conversion (v2) on a 8 socket, > > 80 core system with aim7, I am quite surprised about the numbers - > > considering the lack of queuing in rwlocks. A lot of the tests didn't > > show hardly any difference, but those that really contend this lock > > (with high amounts of users) benefited quite nicely: > > > > Alltests: +28% throughput after 1000 users and runtime was reduced from > > 7.2 to 6.6 secs. > > > > Custom: +61% throughput after 100 users and runtime was reduced from 7 > > to 4.9 secs. > > > > High_systime: +40% throughput after 1000 users and runtime was reduced > > from 19 to 15.5 secs. > > > > Shared: +30.5% throughput after 100 users and runtime was reduced from > > 6.5 to 5.1 secs. > > > > Short: Lots of variance in the numbers, but avg of +29% throughput - > > no particular performance degradation either. > > Are just overwhelming, in my opinion. The conversion *from* a spinlock > never had this kind of support behind it. Agreed. Especially given how primitive rwlock_t is especially on 80 cores, this is really a no-brainer conversion. I have to say I am surprised by the numbers - after so many years it's still amazing how powerful the "get work done and don't interrupt it" batching concept is in computing... > Btw, did anybody run Ingo's patch with lockdep and the spinlock sleep > debugging code to verify that we haven't introduced any problems wrt > sleeping since the lock was converted into a rw-semaphore? > > Because quite frankly, considering these kinds of numbers, I really > don't see how we could possibly make excuses for keeping that > rw-semaphore unless there is some absolutely _horrible_ latency issue? Given that there's only about a dozen critical sections that this lock covers I simply cannot imagine any latency problem that couldn't be fixed in some other fashion. (shrinking the critical section, breaking up a bad loop, etc.) [ Btw., if PREEMPT_RT goes upstream we might not even need to break latencies all that much: people whose usecase values scheduling latency above throughput would run such a critical section preemptible anyway. ] Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/