linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.
Date: Thu, 22 Oct 2015 10:26:18 -0400	[thread overview]
Message-ID: <20151022142618.GC2914@redhat.com> (raw)
In-Reply-To: <062101d10cae$91d986d0$b58c9470$@alibaba-inc.com>

On Thu, Oct 22, 2015 at 05:46:47PM +0800, Hillf Danton wrote:
> > 
> > This is a multi-stage process, first we save and replace page table
> > entry with special HMM entry, also flushing tlb in the process. If
> > we run into non allocated entry we either use the zero page or we
> > allocate new page. For swaped entry we try to swap them in.
> > 
> Please elaborate why swap entry is handled this way.

So first, this is only when you have a device then use HMM and a device
that use memory migration. So far it only make sense for discrete GPUs.
So regular workload that do not use a GPUs with HMM are not impacted and
will not go throught this code path.

Now, here we are migrating memory because the device driver is asking for
it, so presumably we are expecting that the device will use that memory
hence we want to swap in anything that have been swap to disk. Once it is
swap in memory we copy it to device memory and free the pages. So in the
end we only need to allocate a page temporarily until we move things to
the device.

Cheers,
Jerome

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-10-22 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22  9:46 Hillf Danton
2015-10-22 14:26 ` Jerome Glisse [this message]
2015-10-23  3:25   ` Hillf Danton
  -- strict thread matches above, loose matches on Subject: below --
2015-10-21 21:10 [PATCH v11 00/14] HMM anomymous memory migration to device memory Jérôme Glisse
2015-10-21 21:10 ` [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2 Jérôme Glisse

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=20151022142618.GC2914@redhat.com \
    --to=jglisse@redhat.com \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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