Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756442Ab3IAWpL (ORCPT ); Sun, 1 Sep 2013 18:45:11 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:50267 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754761Ab3IAWpG (ORCPT ); Sun, 1 Sep 2013 18:45:06 -0400 Date: Sun, 1 Sep 2013 23:44:59 +0100 From: Al Viro To: Linus Torvalds Cc: Sedat Dilek , Waiman Long , Ingo Molnar , 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" Subject: Re: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount Message-ID: <20130901224459.GW13318@ZenIV.linux.org.uk> References: <20130901212355.GU13318@ZenIV.linux.org.uk> <20130901223521.GV13318@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130901223521.GV13318@ZenIV.linux.org.uk> 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: 1578 Lines: 36 On Sun, Sep 01, 2013 at 11:35:21PM +0100, Al Viro wrote: > > I wonder if there is some false sharing going on. But I don't see that > > either, this is the percpu offset map afaik: > > > > 000000000000f560 d files_lglock_lock > > 000000000000f564 d nr_dentry > > 000000000000f568 d last_ino > > 000000000000f56c d nr_unused > > 000000000000f570 d nr_inodes > > 000000000000f574 d vfsmount_lock_lock > > 000000000000f580 d bh_accounting > > > > and I don't see anything there that would get cross-cpu accesses, so > > there shouldn't be any cacheline bouncing. That's the whole point of > > percpu variables, after all. > > Hell knows... Are you sure you don't see br_write_lock() at all? I don't > see anything else that would cause cross-cpu traffic with that layout... GRRR... I see something else: void file_sb_list_del(struct file *file) { if (!list_empty(&file->f_u.fu_list)) { lg_local_lock_cpu(&files_lglock, file_list_cpu(file)); list_del_init(&file->f_u.fu_list); lg_local_unlock_cpu(&files_lglock, file_list_cpu(file)); } } will cheerfully cause cross-CPU traffic. If that's what is going on, the earlier patch I've sent (not putting non-regulars and files opened r/o on ->s_list) should reduce the cacheline bouncing on that cacheline. -- 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/