lkml.org 
[lkml]   [2008]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM
From
Date
On Tue, 2008-08-05 at 14:43 +1000, Nick Piggin wrote:

> In my opinion, doing this little song and dance (which is a few lines
> of quite well defined APIs, btw) in userspace is preferable to adding
> a single line or exporting a single function in kernel space. Unless
> there is a better reason than eliminating a few lines of userspace code.

Yeah, Dave Airlie just reminded me of the real reason for creating an
API within the kernel. We need this to support kernel mode setting where
we want to provide a frame buffer console and smoothly transition to an
X desktop. Ideally, the console would start before user mode was running
so that our treasured boot messages could be displayed.

> I'm absolutely not against exporting a nice API for a swappable, object
> based memory allocator using ipc or shm to the wider kernel (with a nice
> API rather than just using shmem functions directly of course).

Yeah, we really only need a single argument.

> In the worst case it completely fails, the effort will still show much
> better how and why it needs to be done in kernel.

Sure, let's see if Dave can address the need to allocate these objects
from within the kernel. Of course, that allocation could also be done
using existing kernel APIs.

--
keith.packard@intel.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-08-05 07:23    [W:0.098 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site