[ofa-general] Re: [PATCH][RFC]: pte notifiers -- support for external page tables

Avi Kivity avi at qumranet.com
Wed Sep 5 12:14:27 PDT 2007


Rik van Riel wrote:

>> diff --git a/mm/rmap.c b/mm/rmap.c
>> index 41ac397..3f61d38 100644
>> --- a/mm/rmap.c
>> +++ b/mm/rmap.c
>> @@ -682,6 +682,7 @@ static int try_to_unmap_one(struct page *page, 
>> struct vm_area_struct *vma,
>>      }
>>  
>>      /* Nuke the page table entry. */
>> +    pte_notifier_call(vma, clear, address);
>>      flush_cache_page(vma, address, page_to_pfn(page));
>>      pteval = ptep_clear_flush(vma, address, pte);
>
> If you want this to be useful to Infiniband, you should probably
> also hook up do_wp_page() in mm/memory.c, where a page table can
> be pointed to another page.
>
> Probably the code in mm/mremap.c will need to be hooked up too.
>

I imagine that many of the paravirt_ops mmu hooks will need to be 
exposed as pte notifiers.  This can't be done as part of the 
paravirt_ops code due to the need to pass high level data structures, 
though.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.




More information about the general mailing list