[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tvs9z6vb.fsf@yhuang-dev.intel.com>
Date: Wed, 18 Apr 2018 08:38:16 +0800
From: "Huang\, Ying" <ying.huang@...el.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Tim Chen <tim.c.chen@...el.com>,
Andi Kleen <ak@...ux.intel.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Michal Hocko <mhocko@...e.com>,
Johannes Weiner <hannes@...xchg.org>,
"Shaohua Li" <shli@...nel.org>, Hugh Dickins <hughd@...gle.com>,
Minchan Kim <minchan@...nel.org>,
Rik van Riel <riel@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Zi Yan <zi.yan@...rutgers.edu>
Subject: Re: [PATCH -mm 06/21] mm, THP, swap: Support PMD swap mapping when splitting huge PMD
Randy Dunlap <rdunlap@...radead.org> writes:
> On 04/16/18 19:02, Huang, Ying wrote:
>> From: Huang Ying <ying.huang@...el.com>
>>
>> A huge PMD need to be split when zap a part of the PMD mapping etc.
>> If the PMD mapping is a swap mapping, we need to split it too. This
>> patch implemented the support for this. This is similar as splitting
>> the PMD page mapping, except we need to decrease the PMD swap mapping
>> count for the huge swap cluster too. If the PMD swap mapping count
>> becomes 0, the huge swap cluster will be split.
>>
>> Notice: is_huge_zero_pmd() and pmd_page() doesn't work well with swap
>> PMD, so pmd_present() check is called before them.
>
> FWIW, I would prefer to see that comment in the source code, not just
> in the commit description.
Sure. I will add comment in source code too.
Best Regards,
Huang, Ying
>>
>> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
>> Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
>> Cc: Andrea Arcangeli <aarcange@...hat.com>
>> Cc: Michal Hocko <mhocko@...e.com>
>> Cc: Johannes Weiner <hannes@...xchg.org>
>> Cc: Shaohua Li <shli@...nel.org>
>> Cc: Hugh Dickins <hughd@...gle.com>
>> Cc: Minchan Kim <minchan@...nel.org>
>> Cc: Rik van Riel <riel@...hat.com>
>> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
>> Cc: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
>> Cc: Zi Yan <zi.yan@...rutgers.edu>
>> ---
>> include/linux/swap.h | 6 +++++
>> mm/huge_memory.c | 54 ++++++++++++++++++++++++++++++++++++++++----
>> mm/swapfile.c | 28 +++++++++++++++++++++++
>> 3 files changed, 83 insertions(+), 5 deletions(-)
Powered by blists - more mailing lists