Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743Ab3IKD4m (ORCPT ); Tue, 10 Sep 2013 23:56:42 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:59611 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434Ab3IKD4l (ORCPT ); Tue, 10 Sep 2013 23:56:41 -0400 Date: Wed, 11 Sep 2013 04:56:36 +0100 From: Al Viro To: Linus Torvalds Cc: Waiman Long , Mace Moneta , Josh Boyer , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: kernel BUG at fs/dcache.c:648! with v3.11-7890-ge5c832d Message-ID: <20130911035636.GI13318@ZenIV.linux.org.uk> References: <522FCC06.3090907@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1254 Lines: 25 On Tue, Sep 10, 2013 at 08:22:56PM -0700, Linus Torvalds wrote: > On Tue, Sep 10, 2013 at 6:48 PM, Waiman Long wrote: > > > > I need to clean up some comments in the code. The other thing that I want to > > do is to introduce read_seqlock/read_sequnlock() primitives that do the > > locking without incrementing the sequence number. > > I don't understand. That's the whole *point* of sequence numbers. The > read-locker doesn't ever change the number, only the write-locker > does. > > So I don't see what you would change. I do. What we need on the second pass (one where we currently take seq_writelock()) is exclusion against writers; nothing we are doing is worth disturbing the readers - we don't change any data structures. And simple grabbing the spinlock, without touching the sequence number would achieve exactly that. Writers will have to wait and won't be able to disturb us, readers won't notice anything happening. So yes, this extra primitive does make sense here. -- 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/