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: Wed, 14 Feb 2018 14:01:12 -0500	[thread overview]
Message-ID: <2421ca47-773e-d9c7-0fec-d573812df2c4@amd.com> (raw)
In-Reply-To: <e236e458-5114-49ec-9266-945d11f29035-5C7GfCeVMHo@public.gmane.org>

On 2018-02-14 01:33 PM, Christian König wrote:
> Am 14.02.2018 um 19:24 schrieb Felix Kuehling:
>> On 2018-02-14 01:15 PM, Christian König wrote:
>>> Am 14.02.2018 um 17:35 schrieb Felix Kuehling:
>>>> [SNIP]
>>>>>>>>> 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.
>>>>> That's incorrect as well. Normally multiple devices have multiple
>>>>> ttm_buffer_object, one for each device.
>>>>> Going a bit higher that actually makes sense because the status of
>>>>> each BO is deferent for each device. E.g. one device could have
>>>>> the BO
>>>>> in access while it could be idle on another device.
>>>> Can you point me where this is done? I'm looking at
>>>> amdgpu_gem_prime_foreign_bo. It is used if an AMDGPU BO is imported
>>>> into
>>>> a different AMDGPU device. It creates a new GEM object, with a
>>>> reference
>>>> to the same amdgpu BO (gobj->bo = amdgpu_bo_ref(bo)). To me this looks
>>>> very much like the same amdgpu_bo, and cosequently the same TTM BO
>>>> being
>>>> shared by two GEM objects and two devices.
>>> As Michel pointed out as well that stuff isn't upstream and judging
>>> from the recent requirements it will never go upstream.
>>>
>>>>> If this is enabled by any changes that break existing buffer sharing
>>>>> for
>>>>> A+A or A+I systems, please point it out to me. I'm not aware that
>>>>> this
>>>>> patch series does anything to that effect.
>>>>> As I said it completely breaks scanout with A+I systems.
>>>> Please tell me what "it" is. What in the changes I have posted is
>>>> breaking A+I systems. I don't see it.
>>> Using the same amdgpu_bo structure with multiple devices is what "it"
>>> means here.
>> That statement seems to contradict this previous statement by you:
>>>>>    What we do is map the same
>>>>> BO in VMs on other devices. It has no effect on GART mappings.
>>> Correct VM mapping is unaffected here.
>> Can you clarify that contradiction? Is it OK for us to map the same BO
>> in multiple VMs or not?
>
> By  the current requirements I have I think the answer is no.
>
>>> As I said that concept is incompatible with the requirements on A+A
>>> systems, so we need to find another solution to provide the
>>> functionality.
>> Do you mean you need to find another solution for A+A buffer sharing
>> specifically? Or is this a more general statement that includes the
>> mapping of BOs to multiple VMs on different devices?
>
> A more general statement. We need to find a solution which works for
> everybody and not just works like this in the KFD but breaks A+A
> buffer sharing and so needs to be disabled there.

Well, KFD sharing system memory BOs between GPUs doesn't break A+A.
Implementing a solution for A+A that involves DMABufs will not affect
KFD. And KFD isn't actually broken as far as I know. Once you have a
solution for A+A, maybe it will help me understand the problem and I can
evaluate whether the solution is applicable to KFD and worth adopting.
But for now I have neither a good understanding of the problem, no
evidence that there is a problem affecting KFD, and no way towards a
solution.

>
>>
>>> What's on my TODO list anyway is to extend DMA-buf to not require
>>> pinning and to be able to deal with P2P.
>> Sounds good. That said, KFD is not using DMABufs here.
>>
>>> The former is actually rather easy and already mostly done by sharing
>>> the reservation object between exporter and importer.
>>>
>>> The later is a bit more tricky because I need to create the necessary
>>> P2P infrastructure, but even that is doable in the mid term.
>> The sooner you can share your plans, the better. Right now I'm in a bit
>> of limbo. I feel you're blocking KFD upstreaming based on AMDGPU plans
>> and changes that no one has seen yet.
>
> Well as far as I understand it that is not blocking for the current
> upstreaming because you didn't planned to upstream this use case
> anyway, didn't you?

Which use case? The current patch series enables multi-GPU buffer
sharing of system memory BOs. If it is actually broken, I can reduce the
scope to single-GPU support. But I have no evidence that multi-GPU is
actually broken.

Regards,
  Felix

>
> Regards,
> Christian.
>
>>
>> Thanks,
>>    Felix
>>
>>> 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-14 19:01 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
     [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 [this message]
     [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=2421ca47-773e-d9c7-0fec-d573812df2c4@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.