Re: [PATCH] Export shmem_file_setup and shmem_getpage for DRM-GEM

From: Keith Packard
Date: Sun Aug 03 2008 - 21:55:34 EST


On Fri, 2008-08-01 at 16:50 -0400, Christoph Hellwig wrote:

> Nope. Let the userspace protion create a file in shmfs instead of
> adding fugly kernel interfaces hdiing this fact.

shmem_file_setup is already public, just not exposed to kernel modules.
I suppose we could have user space allocate the shmem file (either via
tmpfs or sysv ipc). tmpfs suffers from the maxfd issue, while sysv ipc
runs up against the SHMMAX value.

The other interface we use, shmem_getpage, doesn't seem supported
through existing interfaces though. I don't want to map the file into
any address space, I just need a pointer to the physical pages which
underlie it. I'll take those pages and hand them to the graphics engine.
shmem_getpage performs precisely the operation needed here.

--
keith.packard@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part