From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934334AbYEGXDZ (ORCPT ); Wed, 7 May 2008 19:03:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934145AbYEGXCq (ORCPT ); Wed, 7 May 2008 19:02:46 -0400 Received: from host36-195-149-62.serverdedicati.aruba.it ([62.149.195.36]:48047 "EHLO mx.cpushare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758242AbYEGXCo (ORCPT ); Wed, 7 May 2008 19:02:44 -0400 Date: Thu, 8 May 2008 01:02:42 +0200 From: Andrea Arcangeli To: Linus Torvalds Cc: Andrew Morton , Christoph Lameter , Jack Steiner , Robin Holt , Nick Piggin , Peter Zijlstra , kvm-devel@lists.sourceforge.net, Kanoj Sarcar , Roland Dreier , Steve Wise , linux-kernel@vger.kernel.org, Avi Kivity , linux-mm@kvack.org, general@lists.openfabrics.org, Hugh Dickins , Rusty Russell , Anthony Liguori , Chris Wright , Marcelo Tosatti , Eric Dumazet , "Paul E. McKenney" Subject: Re: [PATCH 08 of 11] anon-vma-rwsem Message-ID: <20080507230242.GL8276@duo.random> References: <6b384bb988786aa78ef0.1210170958@duo.random> <20080507212650.GA8276@duo.random> <20080507222205.GC8276@duo.random> <20080507225801.GK8276@duo.random> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080507225801.GK8276@duo.random> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To remove mm_lock without adding an horrible system-wide lock before every i_mmap_lock etc.. we've to remove invalidate_range_begin/end. Then we can return to an older approach of doing only invalidate_page and serializing it with the PT lock against get_user_pages. That works fine for KVM but GRU will have to flush the tlb once every time we drop the PT lock, that means once per each 512 ptes on x86-64 etc... instead of a single time for the whole range regardless how large the range is.