public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: linux-kernel@vger.kernel.org
Cc: keithp@keithp.com
Subject: Re: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM
Date: Fri, 01 Aug 2008 00:10:02 -0700	[thread overview]
Message-ID: <1217574602.7524.8.camel@localhost> (raw)
In-Reply-To: <1217573919-7496-2-git-send-email-eric@anholt.net>

[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]

On Thu, 2008-07-31 at 23:58 -0700, Eric Anholt wrote:
> From: Keith Packard <keithp@keithp.com>
> 
> GEM needs to create shmem files and get pages related to a shmem file, and
> using this pair of functions is the easiest way to do that.

Looks like I need to spend more time practicing my git-send-email
incantations.  Here's the belated introduction to my patch series of

0001-PCI-Add-pci_read_base-API.patch
0002-Export-shmem_file_setup-and-shmem_getpage-for-DRM-GE.patch
0003-drm-Add-GEM-graphics-execution-manager-to-i915.patch

This patch series brings a long-awaited kernel memory manager to the i915
driver.  This will allow us to do correct composited OpenGL, speed up
OpenGL-based compositing, and enable framebuffer objects and other "new"
OpenGL extensions.  This patchset is also being built on to enable kernel
modesetting for a non-root, flicker-free X Server.

This patch series relies on a series of cleanups and fixes that have already
been queued by airlied.  That tree can be browsed at:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=shortlog;h=drm-next

The main concern we expect to hear about the GEM API is the set of ioctls that
look suspiciously like file-related syscalls.  We've got small integer handles
to things that we can read/write/mmap, flink and open and close, etc.  Our
initial plan was to use fds, but we ran into two problems as noted in drm_gem.c:

- Process limits prevent more than 1024 or so being used at a time by
  default, and we're looking at tens of thousands of these objects used by
  a single client.
- Inability to allocate high fds will aggravate the X Server's select()
  handling, and likely that of many GL client applications as well.

Overall, even if we cooked up a patch to make our GEM files get fds allocated
above some lower limit, interfering with clients fd namespace for these
driver-internal objects sounded like a recipe for more pain than we were ready
to sign up for.  There are also concerns that for other drivers following the
rough GEM model, they'll need to supply extra hints with mmap/pread/pwrite for
acceptable performance ("access me through this aperture, please, because I
know what operation I'm going to do next").  We've already discussed a
potential mmap flag, even for the relatively simple Intel driver.

Should there be any mail-related failures on my part, the full tree on top of
2.6.27rc1, including what airlied has queued, is at:
git://people.freedesktop.org/~anholt/linux-2.6 on the drm-gem-merge branch
http://cgit.freedesktop.org/~anholt/linux-2.6/log/?h=drm-gem-merge

-- 
Eric Anholt
eric@anholt.net                         eric.anholt@intel.com



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2008-08-01  7:38 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01  6:58 [PATCH] PCI: Add pci_read_base() API Eric Anholt
2008-08-01  6:58 ` [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM Eric Anholt
2008-08-01  6:58   ` [PATCH] drm: Add GEM ("graphics execution manager") to i915 driver Eric Anholt
2008-08-01 15:44     ` Randy Dunlap
2008-08-01 18:11       ` Keith Packard
2008-08-06  1:11       ` Eric Anholt
2008-08-01  7:10   ` Eric Anholt [this message]
2008-08-01 10:57   ` [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM Hugh Dickins
2008-08-01 18:06     ` Keith Packard
2008-08-01 20:50   ` Christoph Hellwig
2008-08-01 23:01     ` Keith Packard
2008-08-03 12:49       ` John Stoffel
2008-08-03 17:52         ` Keith Packard
2008-08-03 23:35           ` files/process scaling problem? (was: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM) Ingo Oeser
2008-08-04  0:19             ` Keith Packard
2008-08-04  8:19               ` Alan Cox
2008-08-04 13:51                 ` Arjan van de Ven
2008-08-04 14:11                   ` Alan Cox
2008-08-04 16:38                     ` Arjan van de Ven
2008-08-04 16:58                     ` Keith Packard
2008-08-04 21:46                       ` Ingo Oeser
2008-08-04 22:20                         ` Dave Airlie
2008-08-05  0:34                         ` Keith Packard
2008-08-11  1:23       ` [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM Christoph Hellwig
2008-08-11  3:03         ` [PATCH] Export shmem_file_setup " Keith Packard
2008-08-04  1:54     ` [PATCH] Export shmem_file_setup and shmem_getpage " Keith Packard
2008-08-04  9:02       ` Nick Piggin
2008-08-04 10:26         ` Keith Packard
2008-08-04 10:43           ` Nick Piggin
2008-08-04 11:45             ` Keith Packard
2008-08-04 17:09               ` Hugh Dickins
2008-08-04 17:25                 ` Keith Packard
2008-08-04 18:39                   ` Hugh Dickins
2008-08-04 19:20                     ` Keith Packard
2008-08-04 19:55                       ` Hugh Dickins
2008-08-04 21:37                         ` Keith Packard
2008-08-05  2:25                         ` John Stoffel
2008-08-05  4:28                           ` Keith Packard
2008-08-06 16:20                             ` Stephane Marchesin
2008-08-06 17:24                               ` Arjan van de Ven
2008-08-06 17:32                                 ` Stephane Marchesin
2008-08-06 17:56                                   ` Keith Packard
2008-08-06 18:09                                     ` Stephane Marchesin
2008-08-06 21:22                                       ` Keith Packard
2008-08-07  2:16                                 ` Stephane Marchesin
2008-08-07  2:57                                   ` Keith Packard
2008-08-11  1:34                                 ` Christoph Hellwig
2008-08-05  4:28                 ` Nick Piggin
2008-08-11  1:30                 ` Christoph Hellwig
2008-08-04 21:58         ` Keith Packard
2008-08-04 22:22           ` Dave Airlie
2008-08-05  4:43           ` Nick Piggin
2008-08-05  5:19             ` Keith Packard
2008-08-07  0:45             ` Jesse Barnes
2008-08-19  1:17             ` Dave Airlie
2008-08-19 10:00               ` Nick Piggin
2008-08-19 16:46                 ` Keith Packard
2008-08-19 18:50                   ` Jesse Barnes
2008-08-21 13:42                     ` Jerome Glisse
2008-08-21 16:15                       ` Jesse Barnes

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=1217574602.7524.8.camel@localhost \
    --to=eric@anholt.net \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox