From: Felix Kuehling <felix.kuehling@amd.com>
To: "Zeng, Oak" <oak.zeng@intel.com>, Dave Airlie <airlied@gmail.com>
Cc: "Philip Yang" <Philip.Yang@amd.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [Intel-xe] Implement svm without BO concept in xe driver
Date: Mon, 21 Aug 2023 16:57:12 -0400 [thread overview]
Message-ID: <a9d08612-c402-68fe-b625-3148e4ce3841@amd.com> (raw)
In-Reply-To: <SA1PR11MB6991E632AFE2684CEC231321921EA@SA1PR11MB6991.namprd11.prod.outlook.com>
On 2023-08-21 15:41, Zeng, Oak wrote:
>> I have thought about emulating BO allocation APIs on top of system SVM.
>> This was in the context of KFD where memory management is not tied into
>> command submissions APIs, which would add a whole other layer of
>> complexity. The main unsolved (unsolvable?) problem I ran into was, that
>> there is no way to share SVM memory as DMABufs. So there is no good way
>> to support applications that expect to share memory in that way.
> Great point. I also discussed the dmabuf thing with Mike (cc'ed). dmabuf is a particular technology created specially for the BO driver (and other driver) to share buffer b/t devices. Hmm/system SVM doesn't need this technology: malloc'ed memory by the nature is already shared b/t different devices (in one process) and CPU. We just can simply submit GPU kernel to all devices with malloc'ed memory and let kmd decide the memory placement (such as map in place or migrate). No need of buffer export/import in hmm/system SVM world.
I disagree. DMABuf can be used for sharing memory between processes. And
it can be used for sharing memory with 3rd-party devices via PCIe P2P
(e.g. a Mellanox NIC). You cannot easily do that with malloc'ed memory.
POSIX IPC requires that you know that you'll be sharing the memory at
allocation time. It adds overhead. And because it's file-backed, it's
currently incompatible with migration. And HMM currently doesn't have a
solution for P2P. Any access by a different device causes a migration to
system memory.
Regards,
Felix
>
> So yes from buffer sharing perspective, the design philosophy is also very different.
>
> Thanks,
> Oak
>
next prev parent reply other threads:[~2023-08-21 20:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 3:37 [Intel-xe] Implement svm without BO concept in xe driver Zeng, Oak
2023-08-15 20:34 ` Zeng, Oak
2023-08-15 22:17 ` Felix Kuehling
2023-08-16 3:47 ` Zeng, Oak
2023-08-16 6:05 ` Christian König
2023-08-16 17:30 ` Zeng, Oak
2023-08-16 21:55 ` Felix Kuehling
2023-08-16 22:51 ` Dave Airlie
2023-08-17 2:12 ` Zeng, Oak
2023-08-18 7:36 ` Thomas Hellström
2023-08-18 16:10 ` Zeng, Oak
2023-08-18 16:54 ` Felix Kuehling
2023-08-20 22:21 ` Dave Airlie
2023-08-21 15:06 ` Zeng, Oak
2023-08-21 15:10 ` Zeng, Oak
2023-08-21 19:17 ` Felix Kuehling
2023-08-21 19:41 ` Zeng, Oak
2023-08-21 20:57 ` Felix Kuehling [this message]
2023-08-22 11:43 ` Ruhl, Michael J
2023-08-22 17:50 ` Zeng, Oak
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=a9d08612-c402-68fe-b625-3148e4ce3841@amd.com \
--to=felix.kuehling@amd.com \
--cc=Philip.Yang@amd.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=oak.zeng@intel.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