Re: Thread-private mappings and graphics (was Re: Per-Processor Data

Linus Torvalds (torvalds@transmeta.com)
14 Dec 1999 10:07:55 -0800


In article <Pine.LNX.3.96.991214021400.376B-100000@wakko.deltatee.com>,
Jason Gunthorpe <jgg@ualberta.ca> wrote:
>
>It seems to me that in the OS/2 environment this problem was solved by
>sacrificing one of the i386 segment registers to a thread-specific value.

This is how Windows does it too, as far as I know (I think %gs is the
thread-specific pointer).

This really is how the graphics context should be done: by a real
pointer. Whether that pointer is in a segment register or as a
"traditional C" pointer in the graphics context descriptor is fairly
secondary.

Of course, it can actually result in the process running out of virtual
address space (graphics need a LOT of address space), but that shouldn't
really be a problem for SGI as they are going Merced anyway. And in the
meantime you can actually use a shared area and a separate exclusive
locking mechanism - no kernel intervention required.

Linus

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