Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbbEZS6w (ORCPT ); Tue, 26 May 2015 14:58:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051AbbEZS6v (ORCPT ); Tue, 26 May 2015 14:58:51 -0400 Date: Tue, 26 May 2015 20:57:27 +0200 From: Oleg Nesterov To: Linus Torvalds Cc: Peter Zijlstra , Paul McKenney , Tejun Heo , Ingo Molnar , Linux Kernel Mailing List , der.herr@hofr.at, Davidlohr Bueso Subject: Re: [RFC][PATCH 0/5] Optimize percpu-rwsem Message-ID: <20150526185727.GA3763@redhat.com> References: <20150526114356.609107918@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1430 Lines: 39 On 05/26, Linus Torvalds wrote: > > On Tue, May 26, 2015 at 4:43 AM, Peter Zijlstra wrote: > > > > This is a derived work of the cpu hotplug lock rework I did in 2013 which never > > really went anywhere because Linus didn't like it. > > > > This applies those same optimizations to the percpu-rwsem. Seeing how we did > > all the work it seemed a waste to not use it at all. > > So I *still* don't like it. > > We literally have one single percpu-rwsem IN THE WHOLE KERNEL TREE. > > One. Well. IIRC Tejun is going to turn signal_struct->group_rwsem into percpu-rwsem. And it can have more users. Say, __sb_start_write/etc does something similar, and last time I checked this code it looked buggy to me. > And that single use that you are optimizing for isn't even explained. > It's not really even clear that that thing is needed: fork() already > takes the mmap_sem for writing, and I'm not at all convinced that the > uprobes code couldn't just use mmap_sem for every mm it traverses, I don't think we can do this... At least I do not see how. register_for_each_vma() would need to lock all ->mmap_sem's in system to avoid the race with fork(). Oleg. -- 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/