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

From: John Stoffel
Date: Sun Aug 03 2008 - 08:50:15 EST


>>>>> "Keith" == Keith Packard <keithp@xxxxxxxxxx> writes:

Keith> 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.

Keith> I can't create that many files; I need thousands of them.

Why? If you need thousands of files, won't the overhead of managing
them dynamically start to be a big load as well?

I assume (sorry for not looking at the code in depth) that you're
trying to setup specific regions of memory with various attributes for
the DRI/DRM/GEM/TTF access to Video cards?

Just seeing your statement that you wanted to add ioctls made me
shudder and try to visuallize a better way to do this.

I realize you're trying to make the drivers generic so that the *BSD
port is simple too, but... thousands of files (per X server? per
xclient) just seems like the wrong level.

Maybe you just need to open the *entire* card with one FD and then
have your own VFS like abstraction in there, which doesn't require
lots of filehandles?

Dunno... just trying to figure out what you're try to mediate here
with ioctl() and how it could be improved/simplified.


John

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/