On Tue, 2006-09-19 at 12:49 +0200, Thomas Hellström wrote:
> Benjamin Herrenschmidt wrote: 
> > On Tue, 2006-09-19 at 11:27 +0200, Thomas Hellström wrote:
> > 
> >   
> > > But this should be the same problem encountered by the agpgart driver?
> > > x86 and x86-64 calls change_page_attr() to take care of this.
> > > On powerpc it is simply a noop. (<asm/agp.h>)
> > >     
> > 
> > Possibly. We sort-of ignore the issue for now on PowerPC and happen to
> > be lucky most of the time because 32 bits PowerPC aren't that agressive
> > at prefetching...
> > 
> > I haven't looked at change_page_attr() implementation on x86 but I know
> > they also map the linear mapping with large pages. I don't know what
> > happens if you start trying to change a single page attribute. x86 can
> > breakup that large page into 4k pages, so maybe that's what happens.
> > 
> >   
> Yes, I think that's what happens. I know some Athlon chips had a big
> issue with this some time ago.
> 
> I notice there are special functions in <agp.h> to alloc / free GATT
> pages, so the general idea might be to have a pool of uncached pages
> in the future for powerpc? Even better would perhaps be to have pages
> that aren't mapped for the kernel. (like highmem pages on x86).

Yes, that's exactly what I'm thinking about doing. However, this is only
a problem for AGP.

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 ?

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.

Ben.



-------------------------------------------------------------------------
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
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to