Re: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

2013-07-12 Thread Pavel Emelyanov
On 07/11/2013 10:46 PM, Andy Lutomirski wrote: > > Sorry I'm late to the party -- I didn't notice this until the lwn > article this week. > > How does this get munmap + mmap right? mremap marks things soft-dirty, > but unmapping and remapping seems like it will result in the soft-dirty > bit bei

Re: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

2013-07-11 Thread Andy Lutomirski
On 04/30/2013 09:12 AM, Pavel Emelyanov wrote: > The soft-dirty is a bit on a PTE which helps to track which pages a task > writes to. In order to do this tracking one should > > 1. Clear soft-dirty bits from PTEs ("echo 4 > /proc/PID/clear_refs) > 2. Wait some time. > 3. Read soft-dirty bit

Re: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

2013-05-03 Thread Pavel Emelyanov
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 u

Re: [PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

2013-05-03 Thread Xiao Guangrong
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 wri

[PATCH 4/5] mm: soft-dirty bits for user memory changes tracking

2013-04-30 Thread Pavel Emelyanov
The soft-dirty is a bit on a PTE which helps to track which pages a task writes to. In order to do this tracking one should 1. Clear soft-dirty bits from PTEs ("echo 4 > /proc/PID/clear_refs) 2. Wait some time. 3. Read soft-dirty bits (55'th in /proc/PID/pagemap entries) To do this tracking