|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH] Add hypercall to mark superpages to improve perf
On 30/04/2010 14:30, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
>>> Secondly, I don't really believe that the mark/unmark
>>> hypercalls are race-free -- bearing in mind, that other mappings (superpage
>>> or otherwise) can be constructed or deleted in parallel on other cpus.
>>
>> I'll look into what can be done to prevent races. I suspect some races we
>> don't care about.
>
> I mean I think there are probably races that can result in inconsistent
> reference counts. I reckon I'll be able to find some when I'm back from
> travelling next week. Obviously, any such race would be unacceptable.
Here's one that's not even really a race: what if a guest marks a superpage
(via hypercall), then creates a mapping of that superpage, then creates
single-page mappings of all pages in the superpage except the first, then
unmarks the superpage? All refcounts of pages in the superpage will be the
same (because the first page holds the superpage mapping count, and all
other pages have a count from their respectibve single-page mappings). So
unmark would succeed, but now destroying the superpage mapping will
erroneously decrement the refcount of every page in the superpage?
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|