Re: AGP and PAT (induced?) problem (on AMD family 6)

From: Rene Herman
Date: Thu Aug 21 2008 - 13:15:21 EST


This is a multi-part message in MIME format.On 21-08-08 14:06, Ingo Molnar wrote:

* Venki Pallipadi <venkatesh.pallipadi@xxxxxxxxx> wrote:

BTW, Rene: Did the patch from yday, caching the last list add, help in eliminating the slowdown in X startup?

Yes, it does. I was reluctant to say so as I feel it works around the problem instead of solving it but yes, it does (free_memtype() would need a similar entry cache for shutdown).

Would be nice to test tip/master - it has both that patch included and the latest pageattr-array API (with enablement in AGP drivers) patchset, done by Shaohua Li, based on Dave's original patch.

That patch by itself doesn't help any -- the new set_memory_array_uc() still calls reserve_memtype() for each single page in the array. To help, it needs to coalesce adjacent entries, which is itself easy to do were it not for the need to keep the list of reserved (base,end) pairs around for free_memtype() time (and halfway fail time).

Also just now looked at multipage allocs in AGP but that has the same issue really -- if you do multipage allocs, you then need to keep the list of regions around for free time.

With worst case lists of AGPSize / 4K entries, this is not nice either (althought worst case is veryvery much worst and unlikely and best case is a 1 entry list).

Should PAT just coalesce the memtype list itself?

Rene.

P.S.

The pageattr-array patch that you currently have in tip/master only enables it for intel-agp, not the others. The attached enables it for all drivers currently directly using agp_generic_alloc_page() and agp_generic_destroy_page() (ocal driver is amd-k7-agp).