Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbbEZV54 (ORCPT ); Tue, 26 May 2015 17:57:56 -0400 Received: from mail-ig0-f169.google.com ([209.85.213.169]:33595 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbbEZV5y (ORCPT ); Tue, 26 May 2015 17:57:54 -0400 MIME-Version: 1.0 In-Reply-To: <1432665731.8196.3.camel@stgolabs.net> References: <20150526114356.609107918@infradead.org> <1432665731.8196.3.camel@stgolabs.net> Date: Tue, 26 May 2015 14:57:53 -0700 X-Google-Sender-Auth: xkDzwScekYU9GiNlgUkT2diMI58 Message-ID: Subject: Re: [RFC][PATCH 0/5] Optimize percpu-rwsem From: Linus Torvalds To: Davidlohr Bueso Cc: Peter Zijlstra , Oleg Nesterov , Paul McKenney , Tejun Heo , Ingo Molnar , Linux Kernel Mailing List , der.herr@hofr.at 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: 1384 Lines: 32 On Tue, May 26, 2015 at 11:42 AM, Davidlohr Bueso wrote: > > Instead of dropping percpu-rwsem, I was thinking we could instead look > for opportunities to convert new users, for instance shinkers, where the > write lock is also taken just for register and unregister purposes, > similar to uprobes. So if there really are useful use cases for this, I don't object to the patch. It seems to just improve on a currently very low-usage locking primitive. And it's not like I conceptually mind the notion of a percpu rwsem, I just hate seeing specialty locking that isn't really worth it. Because as it is, with the current single use, I don't think it's even worth improving on. I _would_ ask that people who are looking at this also look at our "lglock" thing. It's pretty much *exactly* the same thing, except for spinlocks, and that one too has exactly two users (the documentation states that the only user is stop_machine, but in fact file locking does too). Because that is another example of a complete failure of a locking primitive that was just too specialized to be worth it. 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/