Просмотр исходного кода

x86, UV: cpu_relax in uv_wait_completion

The function uv_wait_completion() spins on reads of a memory-mapped
register, waiting for completion of BAU hardware replies.

It should call "cpu_relax()" between those reads to improve performance
on hyperthreaded configurations.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cliff Wickman 16 лет назад
Родитель
Сommit
18c07cf530
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      arch/x86/kernel/tlb_uv.c

+ 1 - 0
arch/x86/kernel/tlb_uv.c

@@ -200,6 +200,7 @@ static int uv_wait_completion(struct bau_desc *bau_desc,
 				destination_timeouts = 0;
 			}
 		}
+		cpu_relax();
 	}
 	return FLUSH_COMPLETE;
 }