|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate
On Mon, Jan 10, 2011 at 10:30 AM, Tim Deegan <Tim.Deegan@xxxxxxxxxx> wrote:
>> Just to be skeptic.
>> Why doesn't mfn_to_gfn() take p2m lock when querying the p2m type?
>
> Because gfn->mfn lookups happen very frequently and requiring the lock
> would be a performance bottleneck on multi-vcpu guests.
I think there's also a deadlock issue. At some point a few months ago
I made ept_get_entry() grab the p2m lock, and it deadlocked with the
paging lock. IIRC, the problem was that
* Sometimes the paging lock is grabbed after the p2m lock is taken
* Sometimes gfn_to_mfn() is called when the paging lock is held
So adding the p2m lock to gfn_to_mfn() gave you a circular lock
dependency, classic condition for deadlock.
-George
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, (continued)
- Re: [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare,
George Dunlap <=
- [Xen-devel] re: [PATCH] mem_sharing: fix race condition of nominate and unshare, tinnycloud
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, Jui-Hao Chiang
- [Xen-devel] re: [PATCH] mem_sharing: fix race condition of nominate and unshare, tinnycloud
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, Jui-Hao Chiang
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, Tim Deegan
- [Xen-devel] RE: [PATCH] mem_sharing: fix race condition of nominate and unshare, MaoXiaoyun
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, Tim Deegan
- [Xen-devel] RE: [PATCH] mem_sharing: fix race condition of nominate and unshare, MaoXiaoyun
- [Xen-devel] Re: [PATCH] mem_sharing: fix race condition of nominate and unshare, Jui-Hao Chiang
- [Xen-devel] RE: [PATCH] mem_sharing: fix race condition of nominate and unshare, MaoXiaoyun
|
|
|
|
|