From: Keith Packard <keithp@keithp.com>
To: Nick Piggin <npiggin@suse.de>
Cc: keithp@keithp.com, eric@anholt.net, hugh@veritas.com,
hch@infradead.org, airlied@linux.ie, jbarnes@virtuousgeek.org,
thomas@tungstengraphics.com, dri-devel@lists.sourceforge.net,
Linux Memory Management List <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch] mm: pageable memory allocator (for DRM-GEM?)
Date: Wed, 24 Sep 2008 18:20:22 -0700 [thread overview]
Message-ID: <1222305622.4343.166.camel@koto.keithp.com> (raw)
In-Reply-To: <20080925003021.GC23494@wotan.suse.de>
[-- Attachment #1: Type: text/plain, Size: 2517 bytes --]
On Thu, 2008-09-25 at 02:30 +0200, Nick Piggin wrote:
> Pity. Anyway, I accept that, let's move on.
Well, the goal is to "eventually" get to use fds so that at least some
of our common operations can use regular sys calls. But, not having
those trapped in the shmem layer may end up being a feature as we'll get
to watch more closely, although dealing with the actual pread/pwrite
semantics doesn't look entirely like fun.
> I guess so. A big problem of ioctls is just that they had been easier to
> add so they got less thought and review ;) If your ioctls are stable,
> correct, cross platform etc. then I guess that's the best you can do.
One does what one can. Of course, in this case, 'cross platform' is just
x86/x86_64 as we're talking Intel integrated graphics. When (if?) we
figure out how to create a common interface across multiple cards for
some of these operations, we'll probably discover mistakes. We have
tried to be careful, but we cannot test in any other environment.
> Well, no not a seperate filesystem to do the pageable backing store, but
> a filesystem to do your object management. If there was a need for pageable
> RAM backing store, then you would still go back to the pageable allocator.
Now that you've written one, we could go back and think about building a
file system and using fds for our operations. It would be a whole lot
easier than starting from scratch.
> You can map them to userspace if you just take a page at a time and insert
> them into the page tables at fault time (or mmap time if you prefer).
> Currently, this will mean that mmapped pages would not be swappable; is
> that a problem?
Yes. We leave a lot of objects mapped to user space as mmap isn't
exactly cheap. We're trying to use pread/pwrite for as much bulk I/O as
we can, but at this point, we're still mapping most of the pages we
allocate into user space and leaving them. Things like textures and
render buffers will get mmapped if there are any software fallbacks.
Other objects, like vertex buffers, will almost always end up mapped.
One of our explicit design goals was to make sure user space couldn't
ever pin arbitrary amounts of memory; I'd hate to go back on that as it
seems like an important property for any subsystem designed to support
regular user applications in a general purpose desktop environment. I
don't want to trust user space to do the right thing, I want to enforce
that from kernel space.
--
keith.packard@intel.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-09-25 1:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 9:10 Nick Piggin
2008-09-23 10:21 ` Thomas Hellström
2008-09-23 11:31 ` Jerome Glisse
2008-09-23 13:18 ` Christoph Lameter
2008-09-25 0:18 ` Nick Piggin
2008-09-25 7:19 ` Thomas Hellström
2008-09-25 14:38 ` Keith Packard
2008-09-25 15:39 ` Thomas Hellström
2008-09-25 22:41 ` Dave Airlie
2008-09-23 15:50 ` Keith Packard
2008-09-23 18:29 ` Jerome Glisse
2008-09-25 0:30 ` Nick Piggin
2008-09-25 1:20 ` Keith Packard [this message]
2008-09-25 2:30 ` Nick Piggin
2008-09-25 2:43 ` Keith Packard
2008-09-25 3:07 ` Nick Piggin
2008-09-25 6:16 ` Keith Packard
2008-09-25 8:45 ` KAMEZAWA Hiroyuki
2008-09-30 1:10 ` Eric Anholt
2008-10-02 17:15 ` Jesse Barnes
2008-10-03 5:17 ` Keith Packard
2008-10-03 6:40 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2008-09-23 9:10 Nick Piggin
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=1222305622.4343.166.camel@koto.keithp.com \
--to=keithp@keithp.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=eric@anholt.net \
--cc=hch@infradead.org \
--cc=hugh@veritas.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=thomas@tungstengraphics.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox