Re: [PATCH v2] After swapout/swapin private dirty mappings are reported clean in smaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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. 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]