Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756684Ab3ICPeJ (ORCPT ); Tue, 3 Sep 2013 11:34:09 -0400 Received: from mail-vc0-f175.google.com ([209.85.220.175]:53350 "EHLO mail-vc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755243Ab3ICPeH (ORCPT ); Tue, 3 Sep 2013 11:34:07 -0400 MIME-Version: 1.0 In-Reply-To: <5225FCEE.7030901@hp.com> References: <5220F090.5050908@hp.com> <20130830194059.GC13318@ZenIV.linux.org.uk> <5220F811.9060902@hp.com> <20130830202608.GD13318@ZenIV.linux.org.uk> <52210225.60805@hp.com> <20130830204852.GE13318@ZenIV.linux.org.uk> <52214EBC.90100@hp.com> <20130831023516.GI13318@ZenIV.linux.org.uk> <20130831024233.GJ13318@ZenIV.linux.org.uk> <5224E647.80303@hp.com> <20130903060130.GD16261@gmail.com> <5225FCEE.7030901@hp.com> Date: Tue, 3 Sep 2013 08:34:06 -0700 X-Google-Sender-Auth: BIyHdJHbF9X152_wI_sbh2DgrRA Message-ID: Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount From: Linus Torvalds To: Waiman Long Cc: Ingo Molnar , Al Viro , Benjamin Herrenschmidt , Jeff Layton , Miklos Szeredi , Ingo Molnar , Thomas Gleixner , linux-fsdevel , Linux Kernel Mailing List , Peter Zijlstra , Steven Rostedt , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 885 Lines: 19 On Tue, Sep 3, 2013 at 8:14 AM, Waiman Long wrote: > > Other than the global tty_ldisc_lock, there is no other major > bottleneck. I am not that worry about the tty_ldisc_lock bottleneck > as real world applications probably won't have that many calls to > set the tty driver. I suspect the tty_ldisc_lock() could be made to go away if we care. Making the ldisc be rcu-free'd, coupled with just optimistically updating the count using "atomic_inc_not_zero()" and re-checking the ldisc pointer afterwards should probably do it. But I agree that it probably isn't worth it for any actual real load. Linus -- 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/