[Xen-devel] [PATCH] "lock cmpxch8b" and split locks

Puthiyaparambil, Aravindh
Wed, 05 Oct 2005 18:27:35 -0000

I have been looking at the following bug
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=252
That investigation is still underway.

While looking at this problem I found that in "lock cmpxch8b
&page->count_info" occurring in "get_page( )",
"&page->count_info" is on
a misaligned address. Furthermore the address of "page" is not modulo
64. So the "lock cmpxch8b" can happen across cache lines and lead to a
split lock. On systems which have multiple buses, the atomicity of such
a statement is not assured and can cause synchronization problems.

I have attached a patch which solves this issue.

Does anyone know if there are other places where the "lock" prefix is
used with a cache misaligned address?

Signed off by Aravindh Puthiyaparambil
<aravindh.puthiyaparambil@unisys.com>