[Intel-gfx] drm_clflush_pages performance

hank peng pengxihan at gmail.com
Sat Sep 15 16:41:31 CEST 2012


I noticed that drm_clflush_pages function will first choose clfush
instead of wbinvd, its code like this:

void
drm_clflush_pages(struct page *pages[], unsigned long num_pages)
{

#if defined(CONFIG_X86)
	if (cpu_has_clflush) {
		drm_cache_flush_clflush(pages, num_pages);
		return;
	}

	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
		printk(KERN_ERR "Timed out waiting for cache flush.\n");


I think using clfush will be slower than using wbinvd, so I wonder if
I use wbinvd first, what else impact will it bring?


-- 
The simplest is not all best but the best is surely the simplest!



More information about the Intel-gfx mailing list