Benjamin Herrenschmidt wrote:
Right.On Tue, 2006-09-19 at 12:49 +0200, Thomas Hellström wrote: I don't think so.For objects that are in video memory but can also be moved back to main memory (what I call "evicted") under pressure by the memory manager, one thing I was wondering is, do we have to bother about cache settings at all ? We are not doing vram yet in the TTM code, but I think a general "eviction" would consist of 1) locking mmap_sems for all processes mapping the buffer. 2) zap the page table. Any attempt to access will be blocked by mmap_sem in nopage(). 3) Copy contents from vram to system using either PCI SG or video-><blit>->AGP-><flip>->system. 4) Wait for completion. 5) release the mmap sem. The page table will be refilled using nopage(). A copy back might be more efficient since in come situations we don't have to wait for completion (If the copy is done using the command queue.) Intel chips for instance have the possibility to flip cached pages into AGP for use with the video blitter. I agree.That is, have them mapped non-cacheable when in vram and cacheable when in main memory. Is there any reason why there would be a problem with userland having the same buffer being sometimes cacheable and non-cacheable ? I don't think so as long as userland isn't using cache tricks and whatever primitive is used to do the copy to/from vram properly accounts for it. /ThomasBen. |
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
