From: Keith Busch <kbusch@kernel.org>
To: Yang Shi <shy828301@gmail.com>
Cc: Keith Busch <keith.busch@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>,
linux-nvdimm@lists.01.org, Dave Hansen <dave.hansen@intel.com>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 3/5] mm: Attempt to migrate page in lieu of discard
Date: Fri, 22 Mar 2019 10:34:41 -0600 [thread overview]
Message-ID: <20190322163440.GB31194@localhost.localdomain> (raw)
In-Reply-To: <CAHbLzkqGGJ7dFiZkR-=yvGEF0AM4JbBe6pxGFbSe9tSnC7wgzQ@mail.gmail.com>
On Thu, Mar 21, 2019 at 04:58:16PM -0700, Yang Shi wrote:
> On Thu, Mar 21, 2019 at 1:03 PM Keith Busch <keith.busch@intel.com> wrote:
> > + if (!PageCompound(page)) {
> > + if (migrate_demote_mapping(page)) {
> > + unlock_page(page);
> > + if (likely(put_page_testzero(page)))
> > + goto free_it;
> > +
> > + /*
> > + * Speculative reference will free this page,
> > + * so leave it off the LRU.
> > + */
> > + nr_reclaimed++;
> > + continue;
> > + }
> > + }
>
> It looks the reclaim path would fall through if the migration is
> failed. But, it looks, with patch #4, you may end up trying reclaim an
> anon page on swapless system if migration is failed?
Right, and add_to_swap() will fail and the page jumps to activate_locked
label, placing it back where it was before.
> And, actually I have the same question with Yan Zi. Why not just put
> the demote candidate into a separate list, then migrate all the
> candidates in bulk with migrate_pages()?
The page is already locked at the point we know we want to migrate it.
next prev parent reply other threads:[~2019-03-22 16:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 20:01 [PATCH 0/5] Page demotion for memory reclaim Keith Busch
2019-03-21 20:01 ` [PATCH 1/5] node: Define and export memory migration path Keith Busch
2019-03-21 20:01 ` [PATCH 2/5] mm: Split handling old page for migration Keith Busch
2019-03-21 20:01 ` [PATCH 3/5] mm: Attempt to migrate page in lieu of discard Keith Busch
2019-03-21 23:58 ` Yang Shi
2019-03-22 16:34 ` Keith Busch [this message]
2019-03-21 20:01 ` [PATCH 4/5] mm: Consider anonymous pages without swap Keith Busch
2019-03-21 20:01 ` [PATCH 5/5] mm/migrate: Add page movement trace event Keith Busch
2019-03-21 21:20 ` [PATCH 0/5] Page demotion for memory reclaim Zi Yan
2019-03-21 22:37 ` Keith Busch
2019-03-21 23:02 ` Yang Shi
2019-03-22 0:20 ` Zi Yan
2019-03-22 0:12 ` Zi Yan
2019-03-22 14:41 ` Keith Busch
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=20190322163440.GB31194@localhost.localdomain \
--to=kbusch@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox