Ville Syrjälä wrote:

On Sun, May 16, 2004 at 08:08:10PM -0700, David Bronaugh wrote:


Vladimir Dergachev wrote:

This brings out an interesting memory management point: swappable versus non-swappable graphics objects.

A framebuffer is obviously non-swappable, while textures are swappable.



Not just textures but other offscreen buffers as well. With a compositing window system all windows have offscreen or system memory buffers. And then there are font glyphs, pixmaps etc.


The problem here becomes how to determine what to throw out and what to do when things get kicked out. Also memory fragmentation can be a problem. If we want to handle all of this the system will start to look like DirectFB's memory allocator.

Currently DirectFB manages all of the offscreen memory and all memory chunks have a usage counter so it can decide what to throw out. If the surface in question has a system memory buffer as well we make sure that it's updated before the video memory copy is thrown out.


I wasn't really speaking of 'throwing out' -- I was speaking of swapping out, to system memory addressable by the AGPGART (stop me when my technobabble starts making no sense). Essentially, once you're all out of AGP memory and card memory, the system refuses to allocate anything more.

As to how to decide what gets faster memory and what doesn't -- well, that's sort of a solved problem, isn't it?

Nasty thing about this is that you can effectively run the card out of memory -- but hey, that's just like any other computer system.

So when allocations start failing, programs have to start removing objects from memory via their -own- memory managers -- the kernel (in this scheme) would not be removing things itself. This is again very similar to the general OS model.

All this is moot if you only have one user at a time contending for card resources. But, if you're going to have more than one user, in my opinion you're going to end up with a kernel-space solution to any kind of resource contention -- like memory, like access to the GPU, etc.

Sorry if I end up sounding arrogant or I'm saying things you know -- that's not my intent.

David Bronaugh


------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to