All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
	<deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>,
	"Oded Gabbay"
	<oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/4] drm/amdkfd: Adding new IOCTL for scratch memory
Date: Tue, 15 Aug 2017 12:03:25 -0400	[thread overview]
Message-ID: <d9a8220d-f9f1-b16c-da11-3c21a450926d@amd.com> (raw)
In-Reply-To: <b114b316-1142-11b8-6393-5f903bb2d663-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>

On 2017-08-15 04:24 AM, Christian König wrote:
> Am 14.08.2017 um 17:31 schrieb Felix Kuehling:
>> [SNIP]
>> Repeating the same argument I made on another email:
>
> Commented on that in the other mail, let's keep the discussion on this
> topic there.
>
>>> BTW: What exactly this this good for?
>> Scratch memory is private memory per work-item. It's used when a shader
>> program has too few registers available. With HSA we use flat scratch
>> addressing, where shaders can access private memory in a special scratch
>> aperture using normal memory instructions. Using the same virtual
>> address, each work item gets its own private piece of memory. The
>> hardware does the address translation from the VA in the private
>> aperture to a scratch-backing VA. The application is responsible for
>> allocating the memory to back that scratch area, and to map it somewhere
>> in its virtual address space.
>>
>> This ioctl tells the hardware (or HWS firmware) the VA of the scratch
>> backing memory.
>
> Ok, you've got me lost here. Not that I'm deeply into that stuff, but
> my last status is that those apertures are global and not per/process
> or VMID.

The apertures for private (scratch) and LDS are configured in
SH_MEM_BASES. As far as I know, this is per VMID. At least that's the
way gfx_v8_0_init_compute_vmid initializes it. When we use the HWS we
don't program this directly, but this information is included in the
map_process packet in the runlist and the firmware programs the
registers when it assigns a VMID to a process.

The scratch backing VA is configured in SH_HIDDEN_PRIVATE_BASE_VMID,
which is per VMID. Again, with the HWS, this is programmed by the
firmware and the driver just includes it in the map_process packet.

Regards,
  Felix

>
> That would mean that when two processes try to set two different
> addresses we are completely lost here.
>
> Christian.

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

  parent reply	other threads:[~2017-08-15 16:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-12  4:47 [PATCH 0/4] More KFD features to make the runtime happy Felix Kuehling
     [not found] ` <1502513265-14281-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-12  4:47   ` [PATCH 1/4] drm/amdgpu: Adding new kgd/kfd interface functions to support scratch memory Felix Kuehling
     [not found]     ` <1502513265-14281-2-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-13  8:56       ` Oded Gabbay
     [not found]         ` <CAFCwf13YDgfX_3EFhQ8sE-8D7ApyDd9zwtqazW6Ups2dPReMqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-15  1:12           ` Felix Kuehling
     [not found]             ` <c42dc57b-999b-250b-8ebe-214502869191-5C7GfCeVMHo@public.gmane.org>
2017-08-15 10:07               ` Marek Olšák
2017-08-15 14:49               ` Deucher, Alexander
2017-08-12  4:47   ` [PATCH 2/4] drm/amdkfd: Adding new IOCTL for " Felix Kuehling
     [not found]     ` <1502513265-14281-3-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-13  9:04       ` Oded Gabbay
     [not found]         ` <CAFCwf11z1Uo9jd82XAGrapXA44KpY+KrV69nbXLkoX6v10_gig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-14 15:10           ` Felix Kuehling
     [not found]             ` <22ab982e-a1b1-5d61-9eaa-f9c149cf3d5e-5C7GfCeVMHo@public.gmane.org>
2017-08-14 15:15               ` Christian König
     [not found]                 ` <c310b952-116b-376c-0794-232e69f88592-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-08-14 15:31                   ` Felix Kuehling
     [not found]                     ` <33308ac3-bdf2-21ac-2122-b43702fdd95f-5C7GfCeVMHo@public.gmane.org>
2017-08-15  8:24                       ` Christian König
     [not found]                         ` <b114b316-1142-11b8-6393-5f903bb2d663-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-08-15 14:33                           ` Alex Deucher
2017-08-15 16:03                           ` Felix Kuehling [this message]
     [not found]                             ` <d9a8220d-f9f1-b16c-da11-3c21a450926d-5C7GfCeVMHo@public.gmane.org>
2017-08-15 18:53                               ` Christian König
2017-08-12  4:47   ` [PATCH 3/4] drm/amdgpu: Add kgd kfd interface get_tile_config() Felix Kuehling
     [not found]     ` <1502513265-14281-4-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-13  9:05       ` Oded Gabbay
2017-08-12  4:47   ` [PATCH 4/4] drm/amdkfd: Implement image tiling mode support Felix Kuehling
     [not found]     ` <1502513265-14281-5-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-13  9:08       ` Oded Gabbay
     [not found]         ` <CAFCwf10iQhAvxZdwCYBK6f0fBKdpgD=f0W886awm2fJVCB=hLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-14 15:18           ` Felix Kuehling
     [not found]             ` <fc37f1a8-9c12-f1da-cdab-f03b50643f19-5C7GfCeVMHo@public.gmane.org>
2017-08-14 22:55               ` Felix Kuehling
     [not found]                 ` <2649fca7-9617-e434-a75a-f76d7e07d0f5-5C7GfCeVMHo@public.gmane.org>
2017-08-15  8:21                   ` Christian König
2017-08-15 10:20                   ` Oded Gabbay
     [not found]                     ` <CAFCwf13bFDhL=_X-zx8AJE+0sD0Aw9z5Rku_7qDgY6VEdtS+qA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-16  0:35                       ` Felix Kuehling
     [not found]                         ` <fd9a9222-f7fa-8f72-6a23-619a17a872e3-5C7GfCeVMHo@public.gmane.org>
2017-08-16  0:40                           ` Michel Dänzer
     [not found]                             ` <8ff456e3-94a8-7547-d01d-6aca5aaface8-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-08-16  9:24                               ` Oded Gabbay
     [not found]                                 ` <CAFCwf11Rjt3smEjF6KAeUWCu=GCsSXAWbd1j4qA2tu+WL0C13g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-16 21:53                                   ` Felix Kuehling
     [not found]                                     ` <f4c6d3c4-3dd9-3add-5ebc-01659a655e66-5C7GfCeVMHo@public.gmane.org>
2017-08-17  9:18                                       ` Christian König

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=d9a8220d-f9f1-b16c-da11-3c21a450926d@amd.com \
    --to=felix.kuehling-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=deathsimple-ANTagKRnAhcb1SvskN2V4Q@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.