Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756107Ab3H3TxJ (ORCPT ); Fri, 30 Aug 2013 15:53:09 -0400 Received: from g4t0017.houston.hp.com ([15.201.24.20]:40819 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753127Ab3H3TxH (ORCPT ); Fri, 30 Aug 2013 15:53:07 -0400 Message-ID: <5220F811.9060902@hp.com> Date: Fri, 30 Aug 2013 15:52:49 -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: Al Viro CC: Linus Torvalds , 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 References: <1377751465.4028.20.camel@pasglop> <20130829070012.GC27322@gmail.com> <52200DAE.2020303@hp.com> <5220E56A.80603@hp.com> <5220F090.5050908@hp.com> <20130830194059.GC13318@ZenIV.linux.org.uk> In-Reply-To: <20130830194059.GC13318@ZenIV.linux.org.uk> 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: 2499 Lines: 54 On 08/30/2013 03:40 PM, Al Viro wrote: > On Fri, Aug 30, 2013 at 03:20:48PM -0400, Waiman Long wrote: > >> There are more contention in the lglock than I remember for the run >> in 3.10. This is an area that I need to look at. In fact, lglock is >> becoming a problem for really large machine with a lot of cores. We >> have a prototype 16-socket machine with 240 cores under development. >> The cost of doing a lg_global_lock will be very high in that type of >> machine given that it is already high in this 80-core machine. I >> have been thinking about instead of per-cpu spinlocks, we could >> change the locking to per-node level. While there will be more >> contention for lg_local_lock, the cost of doing a lg_global_lock >> will be much lower and contention within the local die should not be >> too bad. That will require either a per-node variable infrastructure >> or simulated with the existing per-cpu subsystem. > Speaking of lglock, there's a low-hanging fruit in that area: we have > no reason whatsoever to put anything but regular files with FMODE_WRITE > on the damn per-superblock list - the *only* thing it's used for is > mark_files_ro(), which will skip everything except those. And since > read opens normally outnumber the writes quite a bit... Could you > try the diff below and see if it changes the picture? files_lglock > situation ought to get better... > > Sure. I will try that out, but it probably won't help too much in this test case. The perf profile that I sent out in my previous mail is only partial. The actual one for lg_global_lock was: 1.01% reaim [kernel.kallsyms] [k] lg_global_lock | --- lg_global_lock mntput_no_expire mntput __fput ____fput task_work_run do_notify_resume int_signal | |--51.62%-- __shmdt | --48.38%-- __shmctl So it is the mnput_no_expire() function that is doing all the lg_global_lock() calls. Regards, 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/