Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755908Ab3I3QDa (ORCPT ); Mon, 30 Sep 2013 12:03:30 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:6035 "EHLO g1t0028.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755347Ab3I3QD3 (ORCPT ); Mon, 30 Sep 2013 12:03:29 -0400 Message-ID: <5249A0C4.7050306@hp.com> Date: Mon, 30 Sep 2013 12:03:16 -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: Ingo Molnar CC: Michel Lespinasse , Linus Torvalds , 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 , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Subject: Re: [PATCH] rwsem: reduce spinlock contention in wakeup code path References: <1380308424-31011-1-git-send-email-Waiman.Long@hp.com> <20130928074144.GA17773@gmail.com> <20130930070551.GC13584@gmail.com> In-Reply-To: <20130930070551.GC13584@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; 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: 1015 Lines: 26 On 09/30/2013 03:05 AM, Ingo Molnar wrote: > * Michel Lespinasse wrote: > >> That said, I am very scared of using rwlock_t here, and I would much >> prefer we choose a fair lock (either spinlock or a new rwlock >> implementation which guarantees not to starve any locker thread) > Given how few users rwlock_t has today we could attempt to make it > reader-writer fair, as long as the usecase of a hardirq or softirq > context always getting nested read access on the same CPU is preserved. > > (but that can be done - if nothing else then with an explicit context > check.) > > Thanks, > > Ingo My queue rwlock patch is able to handle the use case of a hardirq and softirq context and can be made almost as fair as the ticket spinlock. -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/