|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86/mm: shuffle log-dirty code so only on
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1297337271 0
# Node ID 0df1b42910b10055721d37a88233e5f140169197
# Parent 19b2424be183b392daa12364bbde4f9bcb0edaae
x86/mm: shuffle log-dirty code so only one path allocates memory
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
xen/arch/x86/mm/paging.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff -r 19b2424be183 -r 0df1b42910b1 xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c Thu Feb 10 09:02:50 2011 +0000
+++ b/xen/arch/x86/mm/paging.c Thu Feb 10 11:27:51 2011 +0000
@@ -132,17 +132,12 @@ static mfn_t paging_new_log_dirty_node(s
return mfn;
}
-/* get the top of the log-dirty bitmap trie, allocating if necessary */
+/* get the top of the log-dirty bitmap trie */
static mfn_t *paging_map_log_dirty_bitmap(struct domain *d)
{
- mfn_t *mapping;
-
if ( likely(mfn_valid(d->arch.paging.log_dirty.top)) )
return map_domain_page(mfn_x(d->arch.paging.log_dirty.top));
-
- d->arch.paging.log_dirty.top = paging_new_log_dirty_node(d, &mapping);
-
- return mapping;
+ return NULL;
}
static void paging_free_log_dirty_page(struct domain *d, mfn_t mfn)
@@ -262,8 +257,12 @@ void paging_mark_dirty(struct domain *d,
i4 = L4_LOGDIRTY_IDX(pfn);
l4 = paging_map_log_dirty_bitmap(d);
- if ( !l4 )
- goto out;
+ if ( unlikely(!l4) )
+ {
+ d->arch.paging.log_dirty.top = paging_new_log_dirty_node(d, &l4);
+ if ( !l4 )
+ goto out;
+ }
mfn = l4[i4];
if ( !mfn_valid(mfn) )
mfn = l4[i4] = paging_new_log_dirty_node(d, &l3);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86/mm: shuffle log-dirty code so only one path allocates memory,
Xen patchbot-unstable <=
|
|
|
|
|