[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ab6ca82-71d4-bdea-ae95-e0bebb5e71df@intel.com>
Date: Fri, 18 Oct 2019 11:15:07 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Yang Shi <shy828301@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux MM <linux-mm@...ck.org>,
Dan Williams <dan.j.williams@...el.com>,
Keith Busch <keith.busch@...el.com>
Subject: Re: [PATCH 3/4] mm/vmscan: Attempt to migrate page in lieu of discard
On 10/17/19 10:30 AM, Yang Shi wrote:
>> + if (!PageHuge(page)) {
>> + int rc = migrate_demote_mapping(page);
>> +
>> + /*
>> + * -ENOMEM on a THP may indicate either migration is
>> + * unsupported or there was not enough contiguous
>> + * space. Split the THP into base pages and retry the
>> + * head immediately. The tail pages will be considered
>> + * individually within the current loop's page list.
>> + */
>> + if (rc == -ENOMEM && PageTransHuge(page) &&
>> + !split_huge_page_to_list(page, page_list))
>> + rc = migrate_demote_mapping(page);
> I recalled when Keith posted the patch at the first time, I raised
> question about why not just migrating THP in a whole? The
> migrate_pages() could handle this. If it fails, it just fallbacks to
> base page.
There's a pair of migrate_demote_mapping()s in there. I expected that
the first will migrate the whole THP and the second plus the split is
only used if fails the whole migration.
Am I reading it wrong?
Powered by blists - more mailing lists