[PATCH] UV: cpu_relax in uv_wait_completion

From: Cliff Wickman
Date: Thu Jan 15 2009 - 10:50:08 EST



From: Cliff Wickman <cpw@xxxxxxx>

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@xxxxxxx>
Acked-by: Jack Steiner <steiner@xxxxxxx>

---
arch/x86/kernel/tlb_uv.c | 1 +
1 file changed, 1 insertion(+)

Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/kernel/tlb_uv.c
+++ linux/arch/x86/kernel/tlb_uv.c
@@ -200,6 +200,7 @@ static int uv_wait_completion(struct bau
destination_timeouts = 0;
}
}
+ cpu_relax();
}
return FLUSH_COMPLETE;
}
--
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/