[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.2-testing] libxc: Remove permute() function from xc_domain_save().
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1206015177 0 # Node ID 0ce555fb429ed53b7273f1cd81308fdeed110386 # Parent 483c882a7df1a3fe81b036fc2f1777a35a6c5ac5 libxc: Remove permute() function from xc_domain_save(). Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> xen-unstable changeset: 17250:d1e91aba27584bbefd3650ac8e5174d63b8e5b33 xen-unstable date: Wed Mar 19 12:41:48 2008 +0000 --- tools/libxc/xc_domain_save.c | 40 +--------------------------------------- 1 files changed, 1 insertion(+), 39 deletions(-) diff -r 483c882a7df1 -r 0ce555fb429e tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Thu Mar 20 12:11:48 2008 +0000 +++ b/tools/libxc/xc_domain_save.c Thu Mar 20 12:12:57 2008 +0000 @@ -123,36 +123,6 @@ static inline int count_bits ( int nr, v for ( i = 0; i < (nr / (sizeof(unsigned long)*8)); i++, p++ ) count += hweight32(*p); return count; -} - -static inline int permute( int i, int nr, int order_nr ) -{ - /* Need a simple permutation function so that we scan pages in a - pseudo random order, enabling us to get a better estimate of - the domain's page dirtying rate as we go (there are often - contiguous ranges of pfns that have similar behaviour, and we - want to mix them up. */ - - /* e.g. nr->oder 15->4 16->4 17->5 */ - /* 512MB domain, 128k pages, order 17 */ - - /* - QPONMLKJIHGFEDCBA - QPONMLKJIH - GFEDCBA - */ - - /* - QPONMLKJIHGFEDCBA - EDCBA - QPONM - LKJIHGF - */ - - do { i = ((i>>(order_nr-10)) | ( i<<10 ) ) & ((1<<order_nr)-1); } - while ( i >= nr ); /* this won't ever loop if nr is a power of 2 */ - - return i; } static uint64_t tv_to_us(struct timeval *new) @@ -859,9 +829,6 @@ int xc_domain_save(int xc_handle, int io /* base of the region in which domain memory is mapped */ unsigned char *region_base = NULL; - /* power of 2 order of p2m_size */ - int order_nr; - /* bitmap of pages: - that should be sent this iteration (unless later marked as skip); - to skip this iteration because already dirty; @@ -970,11 +937,6 @@ int xc_domain_save(int xc_handle, int io /* pretend we sent all the pages last iteration */ sent_last_iter = p2m_size; - - /* calculate the power of 2 order of p2m_size, e.g. - 15->4 16->4 17->5 */ - for ( i = p2m_size-1, order_nr = 0; i ; i >>= 1, order_nr++ ) - continue; /* Setup to_send / to_fix and to_skip bitmaps */ to_send = malloc(BITMAP_SIZE); @@ -1126,7 +1088,7 @@ int xc_domain_save(int xc_handle, int io (batch < MAX_BATCH_SIZE) && (N < p2m_size); N++ ) { - int n = permute(N, p2m_size, order_nr); + int n = N; if ( debug ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |