Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760906AbYB1WAl (ORCPT ); Thu, 28 Feb 2008 17:00:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753103AbYB1WAb (ORCPT ); Thu, 28 Feb 2008 17:00:31 -0500 Received: from relay1.sgi.com ([192.48.171.29]:55674 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752807AbYB1WAa (ORCPT ); Thu, 28 Feb 2008 17:00:30 -0500 Date: Thu, 28 Feb 2008 14:00:24 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andrea Arcangeli cc: Jack Steiner , Nick Piggin , akpm@linux-foundation.org, Robin Holt , Avi Kivity , Izik Eidus , kvm-devel@lists.sourceforge.net, Peter Zijlstra , general@lists.openfabrics.org, Steve Wise , Roland Dreier , Kanoj Sarcar , linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com Subject: Re: [PATCH] mmu notifiers #v7 In-Reply-To: <20080228215257.GJ8091@v2.random> Message-ID: References: <20080219084357.GA22249@wotan.suse.de> <20080219135851.GI7128@v2.random> <20080219231157.GC18912@wotan.suse.de> <20080220010941.GR7128@v2.random> <20080220103942.GU7128@v2.random> <20080221045430.GC15215@wotan.suse.de> <20080221144023.GC9427@v2.random> <20080221161028.GA14220@sgi.com> <20080227192610.GF28483@v2.random> <20080228215257.GJ8091@v2.random> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 26 On Thu, 28 Feb 2008, Andrea Arcangeli wrote: > > This is not going to work even if the mutex would work as easily as you > > think since the patch here still does an rcu_lock/unlock around a callback. > > See underlined. Mutex is not acceptable for performance reasons. I think we can just drop the RCU lock if we simply unregister the mmu notifier in release and forbid the drivers from removing themselves from the notification chain. They can simply do nothing until release. At that time there is no concurrency and thus its safe to remove even without rcu locking. > Good point, it has to be called earlier for GRU, but it's not a > performance issue. GRU doesn't pin the pages so it should make the > global invalidate in ->release _before_ unmap_vmas. Linux can't fault > in the ptes anymore because mm_users is zero so there's no need of a > ->release_begin/end, the _begin is enough. I do not follow you about the _begin without end but the following fix seems okay. -- 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/