lkml.org 
[lkml]   [2010]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] After swapout/swapin private dirty mappings are reported clean in smaps
Date
On Wednesday 15 September 2010 05:56:36 KOSAKI Motohiro wrote:
> > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> > index 439fc1f..06fc468 100644
> > --- a/fs/proc/task_mmu.c
> > +++ b/fs/proc/task_mmu.c
> > @@ -368,7 +368,11 @@ static int smaps_pte_range(pmd_t *pmd, unsigned long
> > addr, unsigned long end, mss->shared_clean += PAGE_SIZE;
> > mss->pss += (PAGE_SIZE << PSS_SHIFT) / mapcount;
> > } else {
> > - if (pte_dirty(ptent))
> > + /*
> > + * File-backed pages, now anonymous are dirty
> > + * with respect to the file.
> > + */
> > + if (pte_dirty(ptent) || (vma->vm_file && PageAnon(page)))
> > mss->private_dirty += PAGE_SIZE;
> > else
> > mss->private_clean += PAGE_SIZE;
>
> This is risky than v1. number of dirties are used a lot of application.
>

This is exactly to help those applications, as currently after swap-out and
swap-in, the same pages are accounted as "Private_Clean:" instead of
"Private_Dirty:".

Thanks
Nikanth


\
 
 \ /
  Last update: 2010-09-15 06:39    [W:0.075 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site