Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755123Ab3I1TOD (ORCPT ); Sat, 28 Sep 2013 15:14:03 -0400 Received: from one.firstfloor.org ([193.170.194.197]:59481 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754869Ab3I1TNn (ORCPT ); Sat, 28 Sep 2013 15:13:43 -0400 Date: Sat, 28 Sep 2013 21:13:39 +0200 From: Andi Kleen To: Linus Torvalds Cc: Ingo Molnar , 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: <20130928191339.GP18242@two.firstfloor.org> References: <1380308424-31011-1-git-send-email-Waiman.Long@hp.com> <20130928074144.GA17773@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 27 > Of course, since then, we may well have screwed things up and now we > sleep under it, but I still really think it was a mistake to do it in > the first place. > > So if the primary reason for this is really just that f*cking anon_vma > lock, then I would seriously suggest: > > - turn it back into a spinlock (or rwlock_t, since we subsequently > separated the read and write paths) Yes please. spinlocks/rwlocks have so much nicer performance behavior than rwsems/mutexes (which noone seems to fully understand) We had also significant performance regressions from every such spinning->sleeping change in the VM (this was just the latest) And afaik anon_vma is usually hold short. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- 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/