Re: [PATCH] 2.6.14-rc4 AGP performance fixes

From: Dave Jones
Date: Sun Oct 16 2005 - 18:02:37 EST


On Fri, Oct 14, 2005 at 10:42:17AM +0100, Alan Hourihane wrote:
> AGP allocation/deallocation is suffering major performance issues due to the
> nature of global_flush_tlb() being called on every change_page_attr() call.
>
> For small allocations this isn't really seen, but when you start allocating
> 50000 pages of AGP space, for say, texture memory, then things can take
> seconds to complete.
>
> In some cases the situation is doubled or even quadrupled in the time due
> to SMP, or a deallocation, then a new reallocation. I've had a case of
> upto 20 seconds wait time to deallocate and reallocate AGP space.

Yikes.

> This patch fixes the problem by making it the caller's responsibility to
> call global_flush_tlb(), and so removes it from every instance of mapping
> a page into AGP space until the time that all change_page_attr() changes
> are done.

I like the idea of minimising the flushes where we can, however the idea
of having stale entries in the TLB's, even for a short time gives me the jibblies
a little. If this does cause any problems, they're likely to be of a nature that
would be incredibly difficult to track down.
(We've been bitten on more than one occasion due to missing flushes in this driver).
Given the wide variety of hardware this driver supports, I'd like this
to sit in -mm for a while, just to be on the safe side.

If Andrew picks that up now, that gives us a while for testing before 2.6.15 closes
for features.

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/