[CRIU] [PATCHv0 3/8] proc_parse: increase longest in vma list when vma is for anon shared mem
Pavel Emelyanov
xemul at parallels.com
Tue Dec 8 04:55:44 PST 2015
On 12/06/2015 04:15 PM, Eugene Batalov wrote:
> From: Fyodor <bocharovfedor at gmail.com>
>
> If we want to use pagemap cache to obtain info about anon shared mem pages
> dirtiness we should choose longest from private and shared vmas and then
> create cache of this size. To simplify code we can do that while parsing
> proc/smaps.
>
> Signed-off-by: Fyodor Bocharov <fbocharov at yandex.ru>
> Signed-off-by: Eugene Batalov <eabatalov89 at gmail.com>
> ---
> proc_parse.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/proc_parse.c b/proc_parse.c
> index c479b0f..45e7c88 100644
> --- a/proc_parse.c
> +++ b/proc_parse.c
> @@ -489,7 +489,8 @@ static int vma_list_add(struct vma_area *vma_area,
>
> list_add_tail(&vma_area->list, &vma_area_list->h);
> vma_area_list->nr++;
> - if (vma_area_is_private(vma_area, kdat.task_size)) {
> + if (vma_area_is_private(vma_area, kdat.task_size) ||
> + vma_area_is(vma_area, VMA_ANON_SHARED)) {
This would also affect the list->priv_size value which is used to calculate
page-pipes lengths for private mappings.
Better collect separate longest value for anon-shared mappings.
> unsigned long pages;
>
> pages = vma_area_len(vma_area) / PAGE_SIZE;
>
More information about the CRIU
mailing list