iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Glisse <j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Wuzongyong (Cordius Wu,
	Euler Dept)"
	<wuzongyong1-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: "Wanzongshun (Vincent)"
	<wanzongshun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"oded.gabbay-5C7GfCeVMHo@public.gmane.org"
	<oded.gabbay-5C7GfCeVMHo@public.gmane.org>
Subject: Re: What differences and relations between SVM, HSA, HMM and Unified Memory?
Date: Mon, 12 Jun 2017 14:44:14 -0400	[thread overview]
Message-ID: <20170612184413.GA5924@gmail.com> (raw)
In-Reply-To: <9BD73EA91F8E404F851CF3F519B14AA8CE753F-OQh+Io27EUn0mp2XfTw+mgK1hpo4iccwjNknBlVQO8k@public.gmane.org>

On Sat, Jun 10, 2017 at 04:06:28AM +0000, Wuzongyong (Cordius Wu, Euler Dept) wrote:
> Hi,
> 
> Could someone explain differences and relations between the SVM
> (Shared Virtual Memory, by Intel), HSA(Heterogeneous System
> Architecture, by AMD), HMM(Heterogeneous Memory Management, by Glisse)
> and UM(Unified Memory, by NVIDIA) ? Are these in the substitutional
> relation?
>
> As I understand it, these aim to solve the same thing, sharing
> pointers between CPU and GPU(implement with ATS/PASID/PRI/IOMMU
> support). So far, SVM and HSA can only be used by integrated gpu.
> And, Intel declare that the root ports doesn't not have the
> required TLP prefix support, resulting  that SVM can't be used
> by discrete devices. So could someone tell me the required TLP
> prefix means what specifically?
>
> With HMM, we can use allocator like malloc to manage host and
> device memory. Does this mean that there is no need to use SVM
> and HSA with HMM, or HMM is the basis of SVM and HAS to
> implement Fine-Grained system SVM defined in the opencl spec?

So aim of all technology is to share address space between a device
and CPU. Now they are 3 way to do it:

  A) all in hardware like CAPI or CCIX where device memory is cache
     coherent from CPU access point of view and system memory is also
     accessible by device in cache coherent way with CPU. So it is
     cache coherency going both way from CPU to device memory and from
     device to system memory


  B) partially in hardware ATS/PASID (which are the same technology
     behind both HSA and SVM). Here it is only single way solution
     where you have cache coherent access from device to system memory
     but not the other way around. Moreover you share the CPU page
     table with the device so you do not need to program the IOMMU.

    Here you can not use the device memory transparently. At least
    not without software help like HMM.


  C) all in software. Here device can access system memory with cache
     coherency but it does not share the same CPU page table. Each
     device have their own page table and thus you need to synchronize
     them.

HMM provides helper that address all of the 3 solutions.
  A) for all hardware solution HMM provides new helpers to help
     with migration of process memory to device memory
  B) for partial hardware solution you can mix with HMM to again
     provide helpers for migration to device memory. This assume
     you device can mix and match local device page table with
     ATS/PASID region
  C) full software solution using all the feature of HMM where it
     is all done in software and HMM is just doing the heavy lifting
     on behalf of device driver

In all of the above we are talking fine-grained system SVM as in
the OpenCL specificiation. So you can malloc() memory and use it
directly from the GPU.

Hope this clarify thing.

Cheers,
Jérôme

  parent reply	other threads:[~2017-06-12 18:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-10  4:06 What differences and relations between SVM, HSA, HMM and Unified Memory? Wuzongyong (Cordius Wu, Euler Dept)
2017-06-12 11:37 ` Jean-Philippe Brucker
2017-07-17 11:57   ` Yisheng Xie
2017-07-17 12:52     ` Jean-Philippe Brucker
     [not found]     ` <1c4f4fb0-7201-ed4c-aa88-4d7e2369238e-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2017-07-17 14:27       ` Jerome Glisse
2017-07-18  0:15         ` Yisheng Xie
     [not found] ` <9BD73EA91F8E404F851CF3F519B14AA8CE753F-OQh+Io27EUn0mp2XfTw+mgK1hpo4iccwjNknBlVQO8k@public.gmane.org>
2017-06-12 18:44   ` Jerome Glisse [this message]
     [not found]     ` <20170612184413.GA5924-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-13 12:36       ` 答复: " Wuzongyong (Cordius Wu, Euler Dept)

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=20170612184413.GA5924@gmail.com \
    --to=j.glisse-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oded.gabbay-5C7GfCeVMHo@public.gmane.org \
    --cc=wanzongshun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=wuzongyong1-hv44wF8Li93QT0dZR+AlfA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).