All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Glisse <j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Felix Kuehling <felix.kuehling-5C7GfCeVMHo@public.gmane.org>
Cc: "Oded Gabbay"
	<oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Maling list - DRI developers"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: New KFD ioctls: taking the skeletons out of the closet
Date: Tue, 6 Mar 2018 18:34:05 -0500	[thread overview]
Message-ID: <20180306233405.GA6764@gmail.com> (raw)
In-Reply-To: <20e5f2e3-89de-c22b-9c9e-c2b6bee02b1c-5C7GfCeVMHo@public.gmane.org>

On Tue, Mar 06, 2018 at 05:44:41PM -0500, Felix Kuehling wrote:
> Hi all,
> 
> Christian raised two potential issues in a recent KFD upstreaming code
> review that are related to the KFD ioctl APIs:
> 
>  1. behaviour of -ERESTARTSYS
>  2. transactional nature of KFD ioctl definitions, or lack thereof
> 
> I appreciate constructive feedback, but I also want to encourage an
> open-minded rather than a dogmatic approach to API definitions. So let
> me take all the skeletons out of my closet and get these APIs reviewed
> in the appropriate forum before we commit to them upstream. See the end
> of this email for reference.
> 
> The controversial part at this point is kfd_ioctl_map_memory_to_gpu. If
> any of the other APIs raise concerns or questions, please ask.
> 
> Because of the HSA programming model, KFD memory management APIs are
> synchronous. There is no pipelining. Command submission to GPUs through
> user mode queues does not involve KFD. This means KFD doesn't know what
> memory is used by the GPUs and when it's used. That means, when the
> map_memory_to_gpu ioctl returns to user mode, all memory mapping
> operations are complete and the memory can be used by the CPUs or GPUs
> immediately.
> 
> HSA also uses a shared virtual memory model, so typically memory gets
> mapped on multiple GPUs and CPUs at the same virtual address.

Does this means that GPU memory get pin ? Or system memory for that matter
too. This was discuss previously but this really goes against kernel mantra
ie kernel no longer manage resources but userspace can hog GPU memory or
even system memory. This is bad !

Cheers,
Jérôme
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-03-06 23:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 22:44 New KFD ioctls: taking the skeletons out of the closet Felix Kuehling
     [not found] ` <20e5f2e3-89de-c22b-9c9e-c2b6bee02b1c-5C7GfCeVMHo@public.gmane.org>
2018-03-06 23:09   ` Dave Airlie
     [not found]     ` <CAPM=9tzYRLHfocxvMM249pKioxELs=pPBgg20N_u1ZXVmAMbSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-07  8:38       ` Christian König
     [not found]         ` <9f3c4b76-9d69-f685-439a-951354e6e98b-5C7GfCeVMHo@public.gmane.org>
2018-03-07 16:38           ` Daniel Vetter
2018-03-07 19:55             ` Alex Deucher
2018-03-07 20:34       ` Felix Kuehling
     [not found]         ` <4ad64912-1fb7-6bcf-8d00-97d9e4ac04bd-5C7GfCeVMHo@public.gmane.org>
2018-03-12 18:17           ` Felix Kuehling
2018-03-12 19:37             ` Daniel Vetter
     [not found]               ` <CAKMK7uG94kutBbK3_ZU6e=0HtJ2FJfgaeEKHtC-WxPen9LJiVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-03-12 20:20                 ` Felix Kuehling
2018-03-06 23:34   ` Jerome Glisse [this message]
2018-03-07  8:41     ` 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=20180306233405.GA6764@gmail.com \
    --to=j.glisse-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=felix.kuehling-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.