All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Yang Shi <shy828301@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Keith Busch <keith.busch@intel.com>
Subject: Re: [PATCH 3/4] mm/vmscan: Attempt to migrate page in lieu of discard
Date: Fri, 18 Oct 2019 11:15:07 -0700	[thread overview]
Message-ID: <6ab6ca82-71d4-bdea-ae95-e0bebb5e71df@intel.com> (raw)
In-Reply-To: <CAHbLzkp_2UD50Vt8f_atxKcz4x8J3GB3YzTqMOd6Src_y2Yg2g@mail.gmail.com>

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?

  reply	other threads:[~2019-10-18 18:15 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 22:11 [PATCH 0/4] [RFC] Migrate Pages in lieu of discard Dave Hansen
2019-10-16 22:11 ` Dave Hansen
2019-10-16 22:11 ` [PATCH 1/4] node: Define and export memory migration path Dave Hansen
2019-10-16 22:11   ` Dave Hansen
2019-10-17 11:12   ` Kirill A. Shutemov
2019-10-17 11:44     ` Kirill A. Shutemov
2019-10-16 22:11 ` [PATCH 2/4] mm/migrate: Defer allocating new page until needed Dave Hansen
2019-10-16 22:11   ` Dave Hansen
2019-10-17 11:27   ` Kirill A. Shutemov
2019-10-16 22:11 ` [PATCH 3/4] mm/vmscan: Attempt to migrate page in lieu of discard Dave Hansen
2019-10-16 22:11   ` Dave Hansen
2019-10-17 17:30   ` Yang Shi
2019-10-17 17:30     ` Yang Shi
2019-10-18 18:15     ` Dave Hansen [this message]
2019-10-18 21:02       ` Yang Shi
2019-10-18 21:02         ` Yang Shi
2019-10-16 22:11 ` [PATCH 4/4] mm/vmscan: Consider anonymous pages without swap Dave Hansen
2019-10-16 22:11   ` Dave Hansen
2019-10-17  3:45 ` [PATCH 0/4] [RFC] Migrate Pages in lieu of discard Shakeel Butt
2019-10-17  3:45   ` Shakeel Butt
2019-10-17 14:26   ` Dave Hansen
2019-10-17 16:58     ` Shakeel Butt
2019-10-17 16:58       ` Shakeel Butt
2019-10-17 20:51       ` Dave Hansen
2019-10-17 17:20     ` Yang Shi
2019-10-17 17:20       ` Yang Shi
2019-10-17 21:05       ` Dave Hansen
2019-10-17 22:58       ` Shakeel Butt
2019-10-17 22:58         ` Shakeel Butt
2019-10-18 21:44         ` Yang Shi
2019-10-18 21:44           ` Yang Shi
2019-10-17 16:01 ` Suleiman Souhlal
2019-10-17 16:01   ` Suleiman Souhlal
2019-10-17 16:32   ` Dave Hansen
2019-10-17 16:39     ` Shakeel Butt
2019-10-17 16:39       ` Shakeel Butt
2019-10-18  8:11     ` Suleiman Souhlal
2019-10-18  8:11       ` Suleiman Souhlal
2019-10-18 15:10       ` Dave Hansen
2019-10-18 15:39         ` Suleiman Souhlal
2019-10-18 15:39           ` Suleiman Souhlal
2019-10-18  7:44 ` Michal Hocko
2019-10-18 14:54   ` Dave Hansen
2019-10-18 21:39     ` Yang Shi
2019-10-18 21:39       ` Yang Shi
2019-10-18 21:55       ` Dan Williams
2019-10-18 21:55         ` Dan Williams
2019-10-22 13:49     ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ab6ca82-71d4-bdea-ae95-e0bebb5e71df@intel.com \
    --to=dave.hansen@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shy828301@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.