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

Ian Pratt
Wed, 05 Oct 2005 19:49:07 -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.

We can''t just increase the size of pfn_info structure -- it has
implications for the amount of VM space that Xen uses. This will require
more thought.

Ian