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

Jim Gettys (jg@pa.dec.com)
Thu, 16 Dec 1999 11:55:54 -0800 (PST)


> Sender: owner-linux-kernel@vger.rutgers.edu
> From: Raul Miller <moth@magenta.com>
> Date: Wed, 15 Dec 1999 09:43:30 -0500
> To: "David S. Miller" <davem@redhat.com>
> Cc: torvalds@transmeta.com, jsimmons@edgeglobal.com,
> linux-kernel@vger.rutgers.edu
> Subject: Re: Thread-private mappings and graphics (was Re: Per-Processor Data
> Page)
> -----
> David S. Miller <davem@redhat.com> wrote:
> > Whereas most SGI, Sun, and other vendor's higher end cards allows you
> > to arbitrarily stop a renderer mid-place, save the card state, and
> > restore the card state another thread has.
> ...
> > Commodity PCI/AGI 3D graphics cards cannot do this, which is why the
> > userland locking solution exists at all. However for cards that can do
> > the above, this is what people want.
>
> What do benchmarks look like -- comparing "swapping card state" vs.
> "keep opengl state off-board and card actions atomic"?
>

Benchmarks have always been that it is much better to keep the state in
the card as much as possible, and all the hardware trends are that this
is more and more important, as processor speeds increase faster than
I/O speeds.

You can't afford to load a ton of registers to the right state and
then draw a single line: you are bus limited on graphics in decent
implementations, even for 2D graphics.

This was true when we did X11 in the 1980's and yet more true today:
even for 2D graphics. Bandwidth is everything, and the processor
doesn't have the bandwidth into the frame buffer that good hardware
assist has (your processor does 32/64 bits at a time, and the outboard
engines have 128/256 wires into the frame buffer memory; you just
can't win).

Even then you have a synchronization problem (among multiple clients in
the DRI case), or if there were a multithreaded X server (it was tried,
but was substantially slower than a single threaded X server): you
have a bunch of registers that have to be correct at the time the
rendering operation is actually executed.

And yes, the hardware trend is toward decent hardware that you can
actually start and stop successfully: will be a while before it is pervasive.
The wheel of invention has a full turn yet in the PC market to get there.
- Jim

--
Jim Gettys
Technology and Corporate Development
Compaq Computer Corporation
jg@pa.dec.com

- 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/