[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.1-testing] libxc: Remove permute() function from xc_domain_save().
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1206016031 0 # Node ID b0a5b418d4a2e5a9a6cfd35b5fc522512770113e # Parent 7ef2eb7341ed18e7770d5b948b8b366bc73c96ae 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 7ef2eb7341ed -r b0a5b418d4a2 tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Thu Mar 20 12:25:35 2008 +0000 +++ b/tools/libxc/xc_domain_save.c Thu Mar 20 12:27:11 2008 +0000 @@ -126,36 +126,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) @@ -813,9 +783,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; @@ -917,11 +884,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); @@ -1075,7 +1037,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 ) DPRINTF("%d pfn= %08lx mfn= %08lx %d [mfn]= %08lx\n", _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |