[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7308c5a2-a24e-85ee-7496-99cd28053af4@suse.cz>
Date: Mon, 6 Apr 2020 10:19:02 +0200
From: Vlastimil Babka <vbabka@...e.cz>
To: "Huang, Ying" <ying.huang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Zi Yan <ziy@...dia.com>,
Andrea Arcangeli <aarcange@...hat.com>,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Michal Hocko <mhocko@...e.com>,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
Jérôme Glisse <jglisse@...hat.com>,
Yang Shi <yang.shi@...ux.alibaba.com>
Subject: Re: [PATCH -V3] /proc/PID/smaps: Add PMD migration entry parsing
On 4/3/20 2:30 PM, Huang, Ying wrote:
> From: Huang Ying <ying.huang@...el.com>
>
> Now, when read /proc/PID/smaps, the PMD migration entry in page table is simply
> ignored. To improve the accuracy of /proc/PID/smaps, its parsing and processing
> is added.
>
> To test the patch, we run pmbench to eat 400 MB memory in background, then run
> /usr/bin/migratepages and `cat /proc/PID/smaps` every second. The issue as
> follows can be reproduced within 60 seconds.
>
> Before the patch, for the fully populated 400 MB anonymous VMA, some THP pages
> under migration may be lost as below.
>
> 7f3f6a7e5000-7f3f837e5000 rw-p 00000000 00:00 0
> Size: 409600 kB
> KernelPageSize: 4 kB
> MMUPageSize: 4 kB
> Rss: 407552 kB
> Pss: 407552 kB
> Shared_Clean: 0 kB
> Shared_Dirty: 0 kB
> Private_Clean: 0 kB
> Private_Dirty: 407552 kB
> Referenced: 301056 kB
> Anonymous: 407552 kB
> LazyFree: 0 kB
> AnonHugePages: 405504 kB
> ShmemPmdMapped: 0 kB
> FilePmdMapped: 0 kB
> Shared_Hugetlb: 0 kB
> Private_Hugetlb: 0 kB
> Swap: 0 kB
> SwapPss: 0 kB
> Locked: 0 kB
> THPeligible: 1
> VmFlags: rd wr mr mw me ac
>
> After the patch, it will be always,
>
> 7f3f6a7e5000-7f3f837e5000 rw-p 00000000 00:00 0
> Size: 409600 kB
> KernelPageSize: 4 kB
> MMUPageSize: 4 kB
> Rss: 409600 kB
> Pss: 409600 kB
> Shared_Clean: 0 kB
> Shared_Dirty: 0 kB
> Private_Clean: 0 kB
> Private_Dirty: 409600 kB
> Referenced: 294912 kB
> Anonymous: 409600 kB
> LazyFree: 0 kB
> AnonHugePages: 407552 kB
> ShmemPmdMapped: 0 kB
> FilePmdMapped: 0 kB
> Shared_Hugetlb: 0 kB
> Private_Hugetlb: 0 kB
> Swap: 0 kB
> SwapPss: 0 kB
> Locked: 0 kB
> THPeligible: 1
> VmFlags: rd wr mr mw me ac
>
> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
> Reviewed-by: Zi Yan <ziy@...dia.com>
> Cc: Andrea Arcangeli <aarcange@...hat.com>
> Cc: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Cc: Alexey Dobriyan <adobriyan@...il.com>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
> Cc: "Jérôme Glisse" <jglisse@...hat.com>
> Cc: Yang Shi <yang.shi@...ux.alibaba.com>
Acked-by: Vlastimil Babka <vbabka@...e.cz>
Thanks!
Powered by blists - more mailing lists