diff options
author | Andres Lagar-Cavilla <andres@lagarcavilla.org> | 2012-02-10 16:07:07 +0000 |
---|---|---|
committer | Andres Lagar-Cavilla <andres@lagarcavilla.org> | 2012-02-10 16:07:07 +0000 |
commit | 2981fb7d9dcbbe36228042fbf00618bb56ebafea (patch) | |
tree | 21e024a9049fee2493626b68116913b83d187025 /xen/common/memory.c | |
parent | 99af3cd40b6e9fde63daddcec86ee5e6db338d94 (diff) | |
download | xen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.tar.gz xen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.tar.bz2 xen-2981fb7d9dcbbe36228042fbf00618bb56ebafea.zip |
Re-order calls to put_gfn() around wait queue invocations
Since we use wait queues to handle potential ring congestion cases,
code paths that try to generate a mem event while holding a gfn lock
would go to sleep in non-preemptible mode.
Most such code paths can be fixed by simply postponing event generation until
locks are released.
Signed-off-by: Adin Scannell <adin@scannell.ca>
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r-- | xen/common/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c index df94dc2ca7..781053d00c 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -166,8 +166,8 @@ int guest_remove_page(struct domain *d, unsigned long gmfn) if ( unlikely(p2m_is_paging(p2mt)) ) { guest_physmap_remove_page(d, gmfn, mfn, 0); - p2m_mem_paging_drop_page(d, gmfn, p2mt); put_gfn(d, gmfn); + p2m_mem_paging_drop_page(d, gmfn, p2mt); return 1; } #else |