reduce tlb/cache flush times of agpgart memory allocation

To reduce tlb/cache flush, makes agp memory allocation do one flush
after all pages in a region are changed to uc.

All agp drivers except agp-sgi uses agp_generic_alloc_page()
for .agp_alloc_page, so the patch should work for them. agp-sgi is only
for ia64, so not a problem too.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: airlied@linux.ie
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Shaohua Li
2008-08-04 14:51:30 +08:00
committed by Ingo Molnar
parent 1ac2f7d55b
commit 466ae83742
3 changed files with 10 additions and 1 deletions

View File

@@ -30,6 +30,10 @@
#define _AGP_BACKEND_PRIV_H 1
#include <asm/agp.h> /* for flush_agp_cache() */
#ifndef map_page_into_agp_noflush
#define map_page_into_agp_noflush(page) map_page_into_agp(page)
#define map_page_into_agp_global_flush()
#endif
#define PFX "agpgart: "