[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200403142621.o6yqrdfdmqkagvif@box>
Date: Fri, 3 Apr 2020 17:26:21 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, 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>,
Vlastimil Babka <vbabka@...e.cz>,
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 Fri, Apr 03, 2020 at 08:30:59PM +0800, 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>
Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
--
Kirill A. Shutemov
Powered by blists - more mailing lists