From: Ken Adams <KAdams-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: CUDA fixed VA allocations and sparse mappings
Date: Wed, 8 Jul 2015 18:27:56 +0000 [thread overview]
Message-ID: <D1C2E1F7.111EF%kadams@nvidia.com> (raw)
In-Reply-To: <CACAvsv5q5yJUmjPgJtxnv1dU--UzD1veePkJzvqjRyNtx=EEbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
responding to this bit of text from ben below:
> "I guess you can probably use the start of the kernel's address space
carveout for these kind of mappings actually? It's not like userspace
can ever have virtual addresses there?"
one of the salient points of how we implement gr and compute setup is that
these buffer regions (shared, global, any but for a hole 0-128MB) are
allocated dynamically. an address space can be setup well in advance and
as long as the gr/compute engine setup buffer allocator is playing along
(i.e honoring the previously allocated regions) things work out just fine.
the term we use internally is "anonymous" address spaces. unbound,
unused as yet.
now, as for how the gpu and cpu address ranges work/or don't: that's up to
the user space code to work through. the cuda guys have various
techniques to make it unified (some work in 64b only, some both, and
almost all require specific API conditions). but, as long as we can have
them tell the kernel what gpu ranges to avoid (by allocating them in
advance) it's up to that code to fulfill the cpu portion.
---
ken
On 7/7/15, 8:18 PM, "Nouveau on behalf of Ben Skeggs"
<nouveau-bounces@lists.freedesktop.org on behalf of skeggsb@gmail.com>
wrote:
>On 8 July 2015 at 10:15, Andrew Chew <achew@nvidia.com> wrote:
>> On Tue, Jul 07, 2015 at 08:13:28PM -0400, Ilia Mirkin wrote:
>>> On Tue, Jul 7, 2015 at 8:11 PM, C Bergström <cbergstrom@pathscale.com>
>>>wrote:
>>> > On Wed, Jul 8, 2015 at 7:08 AM, Ilia Mirkin <imirkin@alum.mit.edu>
>>>wrote:
>>> >> On Tue, Jul 7, 2015 at 8:07 PM, C Bergström
>>><cbergstrom@pathscale.com> wrote:
>>> >>> On Wed, Jul 8, 2015 at 6:58 AM, Ben Skeggs <skeggsb@gmail.com>
>>>wrote:
>>> >>>> On 8 July 2015 at 09:53, C Bergström <cbergstrom@pathscale.com>
>>>wrote:
>>> >>>>> regarding
>>> >>>>> --------
>>> >>>>> Fixed address allocations weren't going to be part of that, but
>>>I see
>>> >>>>> that it makes sense for a variety of use cases. One question I
>>>have
>>> >>>>> here is how this is intended to work where the RM needs to make
>>>some
>>> >>>>> of these allocations itself (for graphics context mapping, etc),
>>>how
>>> >>>>> should potential conflicts with user mappings be handled?
>>> >>>>> --------
>>> >>>>> As an initial implemetation you can probably assume that the GPU
>>> >>>>> offloading is in "exclusive" mode. Basically that the CUDA or
>>>OpenACC
>>> >>>>> code has full ownership of the card. The Tesla cards don't even
>>>have a
>>> >>>>> video out on them. To complicate this even more - some
>>>offloading code
>>> >>>>> has very long running kernels and even worse - may critically
>>>depend
>>> >>>>> on using the full available GPU ram. (Large matrix sizes and
>>>soon big
>>> >>>>> Fortran arrays or complex data types)
>>> >>>> This doesn't change that, to setup the graphics engine, the driver
>>> >>>> needs to map various system-use data structures into the channel's
>>> >>>> address space *somewhere* :)
>>> >>>
>>> >>> I'm not sure I follow exactly what you mean, but I think the
>>>answer is
>>> >>> - don't setup the graphics engine if you're in "compute" mode.
>>>Doing
>>> >>> that, iiuc, will at least provide a start to support for compute.
>>> >>> Anyone who argues that graphics+compute is critical to have
>>>working at
>>> >>> the same time is probably a 1%.
>>> >>
>>> >> On NVIDIA GPUs, compute _is_ part of the graphics engine... aka
>>>PGRAPH.
>>> >
>>> > You can afaik setup PGRAPH without mapping memory for graphics. You
>>> > just init the engine and get out of the way.
>>>
>>> But... you need to map memory to set up the engine. Not a lot, but
>>> it's gotta go *somewhere*.
>>
>> There's some minimal state that needs to be mapped into GPU address
>>space.
>> One thing that comes to mind are pushbuffers, which are needed to submit
>> stuff to any engine.
>I guess you can probably use the start of the kernel's address space
>carveout for these kind of mappings actually? It's not like userspace
>can ever have virtual addresses there?
>
>Ben.
>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nouveau
>_______________________________________________
>Nouveau mailing list
>Nouveau@lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
prev parent reply other threads:[~2015-07-08 18:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 0:42 CUDA fixed VA allocations and sparse mappings Andrew Chew
2015-07-07 15:29 ` [Nouveau] " Ilia Mirkin
[not found] ` <CAKb7UviePF2XcmyeKHQ2cv=hy=NZyYcMrWiTpajJxTFE+10LwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-07 17:27 ` Jerome Glisse
2015-07-09 9:26 ` [Nouveau] " Oded Gabbay
[not found] ` <CAFCwf11pEc7vq0aPxdCRypzcbuaJRgWb_55q4ZUQPAvw5zXzHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-10 0:31 ` Andrew Chew
2015-07-07 18:47 ` Andrew Chew
[not found] ` <20150707004249.GC27924-hKyou4+EtHjTuHN6Nbh//0n48jw8i0AO@public.gmane.org>
2015-07-07 21:09 ` Ben Skeggs
[not found] ` <CACAvsv6=OwXnabpY5c_HHaMkumV-QqCvPd+zia15S_G+Oq29UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-07 23:53 ` C Bergström
[not found] ` <CAOnawYpbqZ04-h2q4JpWjWfygPk5UQX9JWC4oj0RWNn7rzhcBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-07 23:58 ` Ben Skeggs
[not found] ` <CACAvsv5ZrSLzb=N5kLpZP5fwbF+=S414O_QDgsNbi9FvvqxxLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:07 ` C Bergström
[not found] ` <CAOnawYphTmUDxkKrEhUsVR6YRyLQj0P4hwgOkw2Jf4b0BZOSnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:08 ` Ilia Mirkin
[not found] ` <CAKb7UviOx-rNJUkwYB4h8XyQ4x8qp3xAbeHOAeW++O+bHFuyKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:11 ` C Bergström
[not found] ` <CAOnawYo=EFk6KhmudKWi3r-z_J4AHjswTrZSfyp_qZfdmQc=tw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:13 ` Ilia Mirkin
[not found] ` <CAKb7UvhOM+65x80HPAcdTsQB4KsPA780cKg8_30vOy5qWFZt4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:15 ` Andrew Chew
[not found] ` <20150708001559.GA30347-hKyou4+EtHjTuHN6Nbh//0n48jw8i0AO@public.gmane.org>
2015-07-08 0:18 ` Ben Skeggs
[not found] ` <CACAvsv5q5yJUmjPgJtxnv1dU--UzD1veePkJzvqjRyNtx=EEbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:31 ` Andrew Chew
[not found] ` <20150708003153.GA30426-hKyou4+EtHjTuHN6Nbh//0n48jw8i0AO@public.gmane.org>
2015-07-08 0:37 ` Ben Skeggs
[not found] ` <CACAvsv5DtA2WsBQkNWnxZMsonbHsvJ-oKA+frVd-btZXfgiAyw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 0:47 ` Andrew Chew
[not found] ` <20150708004735.GA30570-hKyou4+EtHjTuHN6Nbh//0n48jw8i0AO@public.gmane.org>
2015-07-08 0:51 ` Ben Skeggs
[not found] ` <CACAvsv56doVLnMJKCfQyrPj-ijsW7yuAMv53kR0OKxJ0LKM5iQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-08 19:40 ` Jerome Glisse
[not found] ` <20150708194004.GA8122-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-07-08 21:18 ` Andrew Chew
[not found] ` <20150708211801.GA27080-hKyou4+EtHjTuHN6Nbh//0n48jw8i0AO@public.gmane.org>
2015-07-13 18:45 ` Andrew Chew
2015-07-16 6:34 ` [Nouveau] " Alexandre Courbot
2015-07-08 18:27 ` Ken Adams [this message]
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=D1C2E1F7.111EF%kadams@nvidia.com \
--to=kadams-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=skeggsb-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.