On Thursday 17 March 2005 02:55, Timothy Miller wrote:
> Going on the assumption that the ring buffer is under the control of
> the kernel and/or a privileged process that will follow a strict set
> of rules, I have an idea.
>
> Usually, processes will request access to the ring buffer via IOCTL,
> which inserts into the ring buffer an indirect DMA request to execute
> commands in another set of buffers. That means that the memory
> management of the ring buffer is under centralized software control.
> That means that that software can do whatever it wants, right?
>
> Ok, how about this idea: When the kernel code determines that a
> given ring-buffer page is about to fill, it automatically inserts
> into that buffer a command that directs the DMA engine to fetch from
> a different physical address. This 'link' would then allow the
> kernel to 'chain' physical pages indefinitely.
>
> The only disadvantage I can see is that it would be more complex to
> determine where the GPU 'read pointer' is so as to know which pages
> are no longer in use. But it's really not THAT complicated, and
> there are numerous advantages, such as being able to dynamically
> grow/shrink the ring buffer and reuse consumed pages in random order.
>
> There are still some kinks to work out, but what do you think?
Since everybody likes this idea, I'll take the contrary position.
* There is no advantage to being able to reuse consumed pages in
random order versus a fixed order
* Another way to grow/shrink the ring buffer is to have a predefined
list of pages as I described earlier
* This is more complicated for the driver than a simple, virtually
contiguous buffer
* I imagine the hardware is more complicated as well
* On PCI-e, the interrupt rate may be too high (see below)
Interrupt rate: on PCI, the ring buffer will drain at a rate of 16
ms/page, using my earlier estimate of 256 bytes/millisecond drain rate
for 4K texture pages, so that is ok. But on PCI-e the drain rate may
be 30 to 60 times higher, giving an uncomfortably high interrupt rate.
The fixed set scheme does not have this problem.
So there aren't any advantages that I can see, over a scheme that
preloads a fixed set of physical pages for the ring buffer, while there
are drawbacks.
Regards,
Daniel
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)