lkml.org 
[lkml]   [2013]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking
On 05/03/2013 03:36 PM, Xiao Guangrong wrote:
> On 05/01/2013 12:12 AM, Pavel Emelyanov wrote:
>
>> +static inline void clear_soft_dirty(struct vm_area_struct *vma,
>> + unsigned long addr, pte_t *pte)
>> +{
>> +#ifdef CONFIG_MEM_SOFT_DIRTY
>> + /*
>> + * The soft-dirty tracker uses #PF-s to catch writes
>> + * to pages, so write-protect the pte as well. See the
>> + * Documentation/vm/soft-dirty.txt for full description
>> + * of how soft-dirty works.
>> + */
>> + pte_t ptent = *pte;
>> + ptent = pte_wrprotect(ptent);
>> + ptent = pte_clear_flags(ptent, _PAGE_SOFT_DIRTY);
>> + set_pte_at(vma->vm_mm, addr, pte, ptent);
>> +#endif
>
> It seems that TLBs are not flushed and mmu-notification is not called?

TLBs are flushed by clear_refs_write()->flush_tlb_mm().

As far as MMU notification is concerned -- yes, you're right! I will
prepare the patch for this soon.

> .
>


Thanks,
Pavel


\
 
 \ /
  Last update: 2013-05-03 21:41    [W:0.890 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site