Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1253683 > unrolled thread

Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.

Started by"Hillf Danton" <hillf.zj@alibaba-inc.com>
First post2015-10-22 11:50 +0200
Last post2015-10-23 05:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2. "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-22 11:50 +0200
    Re: [PATCH v11 07/14] HMM: mm add helper to update page table when  migrating memory v2. Jerome Glisse <jglisse@redhat.com> - 2015-10-22 16:30 +0200
      Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2. "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2015-10-23 05:30 +0200

#1253683 — Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.

From"Hillf Danton" <hillf.zj@alibaba-inc.com>
Date2015-10-22 11:50 +0200
SubjectRe: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.
Message-ID<qmkFu-6UJ-51@gated-at.bofh.it>
> 
> 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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1253875 — Re: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.

FromJerome Glisse <jglisse@redhat.com>
Date2015-10-22 16:30 +0200
SubjectRe: [PATCH v11 07/14] HMM: mm add helper to update page table when migrating memory v2.
Message-ID<qmp2r-56v-49@gated-at.bofh.it>
In reply to#1253683
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,
Jérôme
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1254308

From"Hillf Danton" <hillf.zj@alibaba-inc.com>
Date2015-10-23 05:30 +0200
Message-ID<qmBdf-5Xq-13@gated-at.bofh.it>
In reply to#1253875
> > > 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.
> 
I prefer it is in log message.

thanks
Hillf

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web