From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH] mmu notifiers #v3 Date: Tue, 22 Jan 2008 15:43:32 +0100 Message-ID: <20080122144332.GE7331@v2.random> References: <20080113162418.GE8736@v2.random> <20080116124256.44033d48@bree.surriel.com> <478E4356.7030303@qumranet.com> <20080117162302.GI7170@v2.random> <478F9C9C.7070500@qumranet.com> <20080117193252.GC24131@v2.random> <20080121125204.GJ6970@v2.random> <4795F9D2.1050503@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Nick Piggin , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Benjamin Herrenschmidt , steiner-sJ/iWh9BUns@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, daniel.blueman-xqY44rlHlBpWk0Htik3J/w@public.gmane.org, holt-sJ/iWh9BUns@public.gmane.org, Hugh Dickins , clameter-sJ/iWh9BUns@public.gmane.org To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <4795F9D2.1050503-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org On Tue, Jan 22, 2008 at 04:12:34PM +0200, Avi Kivity wrote: > Andrea Arcangeli wrote: >> diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h >> --- a/include/asm-generic/pgtable.h >> +++ b/include/asm-generic/pgtable.h >> @@ -44,8 +44,10 @@ >> ({ \ >> int __young; \ >> __young = ptep_test_and_clear_young(__vma, __address, __ptep); \ >> - if (__young) \ >> + if (__young) { \ >> flush_tlb_page(__vma, __address); \ >> + mmu_notifier(age_page, (__vma)->vm_mm, __address); \ >> + } \ >> __young; \ >> }) >> > > I think that unconditionally doing > > __young |= mmu_notifier(test_and_clear_young, ...); > > allows hardware with accessed bits more control over what is going on. Agreed, likely it'll have to be mmu_notifier_age_page(). ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/