Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754033AbbFEBqP (ORCPT ); Thu, 4 Jun 2015 21:46:15 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:56343 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932163AbbFEBqN (ORCPT ); Thu, 4 Jun 2015 21:46:13 -0400 Date: Fri, 5 Jun 2015 02:45:58 +0100 From: Al Viro To: Linus Torvalds Cc: Davidlohr Bueso , Peter Zijlstra , Oleg Nesterov , Paul McKenney , Tejun Heo , Ingo Molnar , Linux Kernel Mailing List , der.herr@hofr.at Subject: Re: [RFC][PATCH 0/5] Optimize percpu-rwsem Message-ID: <20150605014558.GS7232@ZenIV.linux.org.uk> References: <20150526114356.609107918@infradead.org> <1432665731.8196.3.camel@stgolabs.net> 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: 1099 Lines: 22 On Tue, May 26, 2015 at 02:57:53PM -0700, Linus Torvalds wrote: > Because that is another example of a complete failure of a locking > primitive that was just too specialized to be worth it. FWIW, I hadn't really looked into stop_machine uses, but fs/locks.c one is really not all that great - there we have a large trashcan of a list (every file_lock on the system) and the only use of that list is /proc/locks output generation. Sure, additions take this CPU's spinlock. And removals take pretty much a random one - losing the timeslice and regaining it on a different CPU is quite likely with the uses there. Why do we need a global lock there, anyway? Why not hold only one for the chain currently being traversed? Sure, we'll need to get and drop them in ->next() that way; so what? -- 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/