Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbbGJBQk (ORCPT ); Thu, 9 Jul 2015 21:16:40 -0400 Received: from g2t2353.austin.hp.com ([15.217.128.52]:20433 "EHLO g2t2353.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbbGJBQa (ORCPT ); Thu, 9 Jul 2015 21:16:30 -0400 Message-ID: <559F1CEA.4060806@hp.com> Date: Thu, 09 Jul 2015 21:16:26 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Davidlohr Bueso CC: Peter Zijlstra , Ingo Molnar , Arnd Bergmann , Thomas Gleixner , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Scott J Norton , Douglas Hatch Subject: Re: [PATCH-tip v2 0/2] locking/qrwlock: Improve qrwlock performance References: <1436459543-29126-1-git-send-email-Waiman.Long@hp.com> <1436479469.27924.19.camel@stgolabs.net> In-Reply-To: <1436479469.27924.19.camel@stgolabs.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1509 Lines: 34 On 07/09/2015 06:04 PM, Davidlohr Bueso wrote: > On Thu, 2015-07-09 at 12:32 -0400, Waiman Long wrote: >> With this patch series in place, we can start converting some spinlocks >> back to rwlocks where it makes sense and the lock size increase isn't >> a concern. > Nice, have any users to convert? I can think of a few I've encountered, > but there must be quite a few, specially those nasty global spinlocks > where nobody cares about the size. > > o hugetlb reservation map lock: Updating hugepage ranges does a two step > read/update for the reservation map. The first step could now be done > concurrently if converted. > > o The infamous swap_lock; although I doubt any of the serious offenders > (ie zswap callbacks) would benefit much for anything > beyond /proc/meminfo and related. > > o async cookie sync wait_event, battery/ata bootup(?). > > etc. etc. Obviously the fairness factor is also something to consider. Yes, I saw a couple of global spinlocks that can be converted to rwlocks. The read lock can be used for lookup, whereas the write lock is used for modification. Doing so will enable parallel lookups. As the qrwlock is almost fair compared with the old implementation, it removes a big roadblock for the conversion. Cheers, Longman -- 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/