Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757990Ab3FLUhR (ORCPT ); Wed, 12 Jun 2013 16:37:17 -0400 Received: from mail-vc0-f172.google.com ([209.85.220.172]:38019 "EHLO mail-vc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753331Ab3FLUhO (ORCPT ); Wed, 12 Jun 2013 16:37:14 -0400 MIME-Version: 1.0 In-Reply-To: <1371067399.1746.47.camel@buesod1.americas.hpqcorp.net> References: <20130609193657.GA13392@linux.vnet.ibm.com> <1370911480.9844.160.camel@gandalf.local.home> <1370973186.1744.9.camel@buesod1.americas.hpqcorp.net> <1370974231.9844.212.camel@gandalf.local.home> <1371059401.1746.33.camel@buesod1.americas.hpqcorp.net> <1371067399.1746.47.camel@buesod1.americas.hpqcorp.net> Date: Wed, 12 Jun 2013 13:37:12 -0700 X-Google-Sender-Auth: xcxeCQI9f5dCBguVDnxTiAdYNnE Message-ID: Subject: Re: [PATCH RFC ticketlock] Auto-queued ticketlock From: Linus Torvalds To: Davidlohr Bueso , Al Viro , Waiman Long Cc: Steven Rostedt , Paul McKenney , Linux Kernel Mailing List , Ingo Molnar , =?UTF-8?B?6LWW5rGf5bGx?= , Dipankar Sarma , Andrew Morton , Mathieu Desnoyers , Josh Triplett , niv@us.ibm.com, Thomas Gleixner , Peter Zijlstra , Valdis Kletnieks , David Howells , Eric Dumazet , Darren Hart , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Silas Boyd-Wickizer 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: 1021 Lines: 22 On Wed, Jun 12, 2013 at 1:03 PM, Davidlohr Bueso wrote: > > Waiman's dcache patchet were actually an attempt to address these exact > issues: http://lkml.org/lkml/2013/5/22/716 Ok, looking at that patch-set, I think it has the same race with not atomically getting the d_lock spinlock and d_count going down to zero in dput(). And Waiman clearly didn't know about "atomic_inc_not_zero()" or "atomic_dec_and_lock()" that are designed for exactly the "increment if already nonzero" and "decrement without taking the lock if we're not going down to zero" cases. As outlined, I'm also not at all sure that the whole seqrw-lock thing that Waiman did is really necessary - I think the optimistic dget_parent() might be sufficient. 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/