From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: [ofa-general] Re: [PATCH 0 of 9] mmu notifier #v12 Date: Tue, 22 Apr 2008 15:21:43 +0200 Message-ID: <20080422132143.GS12709@duo.random> References: <20080409131709.GR11364@sgi.com> <20080409144401.GT10133@duo.random> <20080409185500.GT11364@sgi.com> <20080422072026.GM12709@duo.random> <20080422120056.GR12709@duo.random> <20080422130120.GR22493@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nick Piggin , Jack Steiner , Peter Zijlstra , kvm-devel@lists.sourceforge.net, Kanoj Sarcar , Roland Dreier , linux-kernel@vger.kernel.org, Avi Kivity , linux-mm@kvack.org, general@lists.openfabrics.org, Hugh Dickins , akpm@linux-foundation.org, Christoph Lameter To: Robin Holt Return-path: Content-Disposition: inline In-Reply-To: <20080422130120.GR22493@sgi.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org List-Id: kvm.vger.kernel.org On Tue, Apr 22, 2008 at 08:01:20AM -0500, Robin Holt wrote: > On Tue, Apr 22, 2008 at 02:00:56PM +0200, Andrea Arcangeli wrote: > > On Tue, Apr 22, 2008 at 09:20:26AM +0200, Andrea Arcangeli wrote: > > > invalidate_range_start { > > > spin_lock(&kvm->mmu_lock); > > > > > > kvm->invalidate_range_count++; > > > rmap-invalidate of sptes in range > > > > > > > write_seqlock; write_sequnlock; > > I don't think you need it here since invalidate_range_count is already > elevated which will accomplish the same effect. Agreed, seqlock only in range_end should be enough. BTW, the fact seqlock is needed regardless of invalidate_page existing or not, really makes invalidate_page a no brainer not just from the core VM point of view, but from the driver point of view too. The kvm_page_fault logic would be the same even if I remove invalidate_page from the mmu notifier patch but it'd run slower both when armed and disarmed.