All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling-5C7GfCeVMHo@public.gmane.org>
To: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: Oak Zeng <Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 14/25] drm/amdkfd: Populate DRM render device minor
Date: Tue, 13 Feb 2018 14:18:20 -0500	[thread overview]
Message-ID: <c991529e-2489-169c-cc34-96ed5bb94a12@amd.com> (raw)
In-Reply-To: <9f078a60-0cca-ba43-3e1c-c67c2b758988-5C7GfCeVMHo@public.gmane.org>

On 2018-02-13 01:15 PM, Christian König wrote:
> Am 13.02.2018 um 18:18 schrieb Felix Kuehling:
>> On 2018-02-13 12:06 PM, Christian König wrote:
>>> [SNIP]
>>> Ah, yeah that is also a point I wanted to to talk about with you.
>>>
>>> The approach of using the same buffer object with multiple amdgpu
>>> devices doesn't work in general.
>>>
>>> We need separate TTM object for each BO in each device or otherwise we
>>> break A+A laptops.
>> I think it broke for VRAM BOs because we enabled P2P on systems that
>> didn't support it properly. But at least system memory BOs can be shared
>> quite well between devices and we do it all the time.
>
> Sharing VRAM BOs is one issue, but the problem goes deeper than just
> that.
>
> Starting with Carizzo we can scanout from system memory to avoid the
> extra copy on A+A laptops. For this to work we need the BO mapped to
> GART (and I mean a real VMID0 mapping, not just in the GTT domain).
> And for this to work in turn we need a TTM object per device and not a
> global one.

I still don't understand. I think what you're talking about applies only
to BOs used for scan-out. Every BO is allocated from a specific device
and can only be GART-mapped on that device. What we do is map the same
BO in VMs on other devices. It has no effect on GART mappings.

>
>> I don't see how you can have separate TTM objects referring to the
>> same memory.
>
> Well that is trivial, we do this all the time with prime and I+A laptops.

As I understand it, you use DMABuf to export/import buffers on multiple
devices. I believe all devices share a single amdgpu_bo, which contains
the ttm_buffer_object. The only way you can have a new TTM buffer object
per device is by using SG tables and pinning the BOs. But I think we
want to avoid pinning BOs.

What we do does not involve pinning of BOs, even when they're shared
between multiple devices' VMs.

>
>>> That is also the reason we had to disable this feature again in the
>>> hybrid branches.
>> What you disabled on hybrid branches was P2P, which only affects
>> large-BAR systems. Sharing of system memory BOs between devices still
>> works fine.
>
> No, it doesn't. It completely breaks any scanout on Carizzo, Stoney
> and Raven. Additional to that we found that it breaks some aspects of
> the user space interface.

Let me check that with my current patch series. The patches I submitted
here shouldn't include anything that breaks the use cases you describe.
But I'm quite sure it will support sharing BOs between multiple devices'
VMs.

Regards,
  Felix

>
> So end result is that we probably need to revert it and find a
> different solution. I'm already working on this for a couple of weeks
> now and should have something ready after I'm done with the PASID
> handling.
>
> Regards,
> Christian.

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-02-13 19:18 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07  1:32 [PATCH 00/25] Add KFD GPUVM support for dGPUs v2 Felix Kuehling
     [not found] ` <1517967174-21709-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-07  1:32   ` [PATCH 01/25] drm/amdgpu: remove useless BUG_ONs Felix Kuehling
2018-02-07  1:32   ` [PATCH 02/25] drm/amdgpu: Replace kgd_mem with amdgpu_bo for kernel pinned gtt mem Felix Kuehling
2018-02-07  1:32   ` [PATCH 03/25] drm/amdgpu: Fix header file dependencies Felix Kuehling
2018-02-07  1:32   ` [PATCH 04/25] drm/amdgpu: Fix wrong mask in get_atc_vmid_pasid_mapping_pasid Felix Kuehling
2018-02-07  1:32   ` [PATCH 05/25] drm/amdgpu: Remove unused kfd2kgd interface Felix Kuehling
     [not found]     ` <1517967174-21709-6-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-11 12:44       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 06/25] drm/amdgpu: Add KFD eviction fence Felix Kuehling
     [not found]     ` <1517967174-21709-7-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-11 12:42       ` Oded Gabbay
2018-02-12 19:19         ` Felix Kuehling
2018-02-07  1:32   ` [PATCH 07/25] drm/amdgpu: Update kgd2kfd_shared_resources for dGPU support Felix Kuehling
     [not found]     ` <1517967174-21709-8-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-11 12:54       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 08/25] drm/amdgpu: add amdgpu_sync_clone Felix Kuehling
     [not found]     ` <1517967174-21709-9-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-11 12:54       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 09/25] drm/amdgpu: Add GPUVM memory management functions for KFD Felix Kuehling
     [not found]     ` <1517967174-21709-10-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  8:42       ` Oded Gabbay
     [not found]         ` <CAFCwf10ThSfo8zphxPRH549LoyJ1H+XM89rpwpSNeJeuWYayAA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-12 19:20           ` Felix Kuehling
2018-02-07  1:32   ` [PATCH 10/25] drm/amdgpu: Add submit IB function " Felix Kuehling
2018-02-07  1:32   ` [PATCH 11/25] drm/amdkfd: Centralize IOMMUv2 code and make it conditional Felix Kuehling
     [not found]     ` <1517967174-21709-12-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-07 11:20       ` Christian König
     [not found]         ` <281bede7-0ae6-c7d1-3d3a-a3e0497244c1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-07 20:51           ` Felix Kuehling
     [not found]             ` <bfe03de8-63fb-efb4-94e5-5eaf4628bfc1-5C7GfCeVMHo@public.gmane.org>
2018-02-08  8:16               ` Christian König
     [not found]                 ` <50866577-97a4-2786-18af-ddb60a435aea-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-12  9:06                   ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 12/25] drm/amdkfd: Use per-device sched_policy Felix Kuehling
     [not found]     ` <1517967174-21709-13-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  9:07       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 13/25] drm/amdkfd: Remove unaligned memory access Felix Kuehling
     [not found]     ` <1517967174-21709-14-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  9:11       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 14/25] drm/amdkfd: Populate DRM render device minor Felix Kuehling
     [not found]     ` <1517967174-21709-15-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-09 12:34       ` Christian König
     [not found]         ` <16aa5300-7ddc-518a-2080-70cb31b6ad56-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-09 20:31           ` Felix Kuehling
     [not found]             ` <5f1c33b3-b3ed-f627-9b5c-347b2399d90f-5C7GfCeVMHo@public.gmane.org>
2018-02-11  9:55               ` Christian König
     [not found]                 ` <dd476550-9a48-3adc-30e6-8a94bd04833b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-12 16:57                   ` Felix Kuehling
     [not found]                     ` <d11c598a-b51f-b957-7dae-485025a1ad34-5C7GfCeVMHo@public.gmane.org>
2018-02-12 23:23                       ` Felix Kuehling
     [not found]                         ` <ce14b4cd-2bb7-8f19-b464-ddf9f68f45ad-5C7GfCeVMHo@public.gmane.org>
2018-02-13 10:25                           ` Christian König
     [not found]                             ` <cbd18308-c464-125e-ef9f-180c12a9926a-5C7GfCeVMHo@public.gmane.org>
2018-02-13 16:42                               ` Felix Kuehling
     [not found]                                 ` <a2e39184-8db8-407d-6608-6ae211563459-5C7GfCeVMHo@public.gmane.org>
2018-02-13 17:06                                   ` Christian König
     [not found]                                     ` <8424282f-d196-3cb6-9a6e-a26f8be7d198-5C7GfCeVMHo@public.gmane.org>
2018-02-13 17:18                                       ` Felix Kuehling
     [not found]                                         ` <ebf4d6d7-2424-764f-0bc0-615240c82483-5C7GfCeVMHo@public.gmane.org>
2018-02-13 18:15                                           ` Christian König
     [not found]                                             ` <9f078a60-0cca-ba43-3e1c-c67c2b758988-5C7GfCeVMHo@public.gmane.org>
2018-02-13 19:18                                               ` Felix Kuehling [this message]
     [not found]                                                 ` <c991529e-2489-169c-cc34-96ed5bb94a12-5C7GfCeVMHo@public.gmane.org>
2018-02-13 23:17                                                   ` Felix Kuehling
     [not found]                                                     ` <b28b0e4c-f16b-0751-7957-45196c26da82-5C7GfCeVMHo@public.gmane.org>
2018-02-14  7:42                                                       ` Christian König
     [not found]                                                         ` <ca973468-f1af-b510-a6db-af29e279f5ca-5C7GfCeVMHo@public.gmane.org>
2018-02-14 16:35                                                           ` Felix Kuehling
     [not found]                                                             ` <50befcd2-6a1a-534e-1699-8556c4977b76-5C7GfCeVMHo@public.gmane.org>
2018-02-14 16:50                                                               ` Michel Dänzer
     [not found]                                                                 ` <ef95f1a4-7b30-47c8-8f33-4e6379d0694b-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-02-14 18:12                                                                   ` Felix Kuehling
2018-02-14 18:15                                                               ` Christian König
     [not found]                                                                 ` <df9f32ce-7cfe-8684-1090-48f37863a3c7-5C7GfCeVMHo@public.gmane.org>
2018-02-14 18:24                                                                   ` Felix Kuehling
     [not found]                                                                     ` <78274290-eaf9-0f79-eb2b-ec7866a4cb70-5C7GfCeVMHo@public.gmane.org>
2018-02-14 18:33                                                                       ` Christian König
     [not found]                                                                         ` <e236e458-5114-49ec-9266-945d11f29035-5C7GfCeVMHo@public.gmane.org>
2018-02-14 19:01                                                                           ` Felix Kuehling
     [not found]                                                                             ` <2421ca47-773e-d9c7-0fec-d573812df2c4-5C7GfCeVMHo@public.gmane.org>
2018-02-14 19:04                                                                               ` Felix Kuehling
2018-02-14  8:50                                                   ` Michel Dänzer
     [not found]                                                     ` <255915a6-f101-554a-9087-1fd792ee1de3-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-02-14 16:39                                                       ` Felix Kuehling
2018-02-13 10:46                       ` Christian König
     [not found]                         ` <d5499f91-6ebf-94ae-f933-d57cd953e01d-5C7GfCeVMHo@public.gmane.org>
2018-02-13 16:56                           ` Felix Kuehling
     [not found]                             ` <a776f882-2612-35a1-431b-2e939cd36f29-5C7GfCeVMHo@public.gmane.org>
2018-02-13 18:45                               ` Christian König
     [not found]                                 ` <6c9d2b9e-7ae9-099a-9d02-bc2a4985a95a-5C7GfCeVMHo@public.gmane.org>
2018-02-13 19:22                                   ` Felix Kuehling
     [not found]                                     ` <b6af300e-be33-b802-385a-20980d95545d-5C7GfCeVMHo@public.gmane.org>
2018-02-14  7:49                                       ` Christian König
2018-02-07  1:32   ` [PATCH 15/25] drm/amdkfd: Add GPUVM virtual address space to PDD Felix Kuehling
     [not found]     ` <1517967174-21709-16-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  9:16       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 16/25] drm/amdkfd: Implement KFD process eviction/restore Felix Kuehling
     [not found]     ` <1517967174-21709-17-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  9:36       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 17/25] uapi: Fix type used in ioctl parameter structures Felix Kuehling
     [not found]     ` <1517967174-21709-18-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-02-12  9:41       ` Oded Gabbay
2018-02-07  1:32   ` [PATCH 18/25] drm/amdkfd: Remove limit on number of GPUs Felix Kuehling
2018-02-07  1:32   ` [PATCH 19/25] drm/amdkfd: Aperture setup for dGPUs Felix Kuehling
2018-02-07  1:32   ` [PATCH 20/25] drm/amdkfd: Add per-process IDR for buffer handles Felix Kuehling
2018-02-07  1:32   ` [PATCH 21/25] drm/amdkfd: Allocate CWSR trap handler memory for dGPUs Felix Kuehling
2018-02-07  1:32   ` [PATCH 22/25] drm/amdkfd: Add TC flush on VMID deallocation for Hawaii Felix Kuehling
2018-02-07  1:32   ` [PATCH 23/25] drm/amdkfd: Add ioctls for GPUVM memory management Felix Kuehling
2018-02-07  1:32   ` [PATCH 24/25] drm/amdkfd: Kmap event page for dGPUs Felix Kuehling
2018-02-07  1:32   ` [PATCH 25/25] drm/amdkfd: Add module option for testing large-BAR functionality Felix Kuehling
  -- strict thread matches above, loose matches on Subject: below --
2018-01-27  1:09 [PATCH 00/25] Add KFD GPUVM support for dGPUs Felix Kuehling
     [not found] ` <1517015381-1080-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2018-01-27  1:09   ` [PATCH 14/25] drm/amdkfd: Populate DRM render device minor Felix Kuehling

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=c991529e-2489-169c-cc34-96ed5bb94a12@amd.com \
    --to=felix.kuehling-5c7gfcevmho@public.gmane.org \
    --cc=Oak.Zeng-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.