[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definit
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age |
Date: |
Tue, 11 Mar 2014 22:08:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
<address@hidden> wrote:
> From: ChenLiang <address@hidden>
>
> Signed-off-by: ChenLiang <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
You are changing teh types introduced in patch2, please fix them there?
Anyways, why are you changing the age to int64_t? Not that I expect it
to be so big, but I would expect it not to be negative?
Later, Juan.
> ---
> arch_init.c | 4 ++--
> include/migration/page_cache.h | 4 ++--
> page_cache.c | 6 +++---
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index 461a10a..1c1488a 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -109,7 +109,7 @@ const uint32_t arch_type = QEMU_ARCH;
> static bool mig_throttle_on;
> static void check_guest_throttling(void);
>
> -static uint64_t bitmap_sync_cnt;
> +static int64_t bitmap_sync_cnt;
> /* the functions *_bitmap_sync_cnt only run in migrate thread */
> static inline void reset_bitmap_sync_cnt(void)
> {
> @@ -121,7 +121,7 @@ static inline void increase_bitmap_sync_cnt(void)
> bitmap_sync_cnt++;
> }
>
> -static inline uint64_t get_bitmap_sync_cnt(void)
> +static inline int64_t get_bitmap_sync_cnt(void)
> {
> return bitmap_sync_cnt;
> }
> diff --git a/include/migration/page_cache.h b/include/migration/page_cache.h
> index dc0c6b5..34518ba 100644
> --- a/include/migration/page_cache.h
> +++ b/include/migration/page_cache.h
> @@ -46,7 +46,7 @@ void cache_fini(PageCache *cache);
> * @current_age indicate the age of the page if cache hit
> */
> bool cache_is_cached(const PageCache *cache, uint64_t addr,
> - uint64_t current_age);
> + int64_t current_age);
>
> /**
> * get_cached_data: Get the data cached for an addr
> @@ -70,7 +70,7 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t
> addr);
> * @current_age indicate the age of the page if the page is inserted into
> cache
> */
> int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata,
> - uint64_t current_age);
> + int64_t current_age);
>
> /**
> * cache_resize: resize the page cache. In case of size reduction the extra
> diff --git a/page_cache.c b/page_cache.c
> index 579330c..b32afdc 100644
> --- a/page_cache.c
> +++ b/page_cache.c
> @@ -40,7 +40,7 @@ typedef struct CacheItem CacheItem;
>
> struct CacheItem {
> uint64_t it_addr;
> - uint64_t it_age;
> + int64_t it_age;
> uint8_t *it_data;
> };
>
> @@ -140,7 +140,7 @@ uint8_t *get_cached_data(const PageCache *cache, uint64_t
> addr)
> }
>
> bool cache_is_cached(const PageCache *cache, uint64_t addr,
> - uint64_t current_age)
> + int64_t current_age)
> {
> CacheItem *it = NULL;
>
> @@ -155,7 +155,7 @@ bool cache_is_cached(const PageCache *cache, uint64_t
> addr,
> }
>
> int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata,
> - uint64_t current_age)
> + int64_t current_age)
> {
>
> CacheItem *it = NULL;
- Re: [Qemu-devel] [PATCH 03/10] XBZRLE: optimize XBZRLE to decrease the cache missing, (continued)
- [Qemu-devel] [PATCH 09/10] migration: expose the bitmap_sync_cnt to the end user, arei.gonglei, 2014/03/11
- [Qemu-devel] [PATCH 07/10] migraion: clear the death code, arei.gonglei, 2014/03/11
- [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age, arei.gonglei, 2014/03/11
- [Qemu-devel] [PATCH 10/10] XBZRLE: update the doc of XBZRLE, arei.gonglei, 2014/03/11
- [Qemu-devel] [PATCH 02/10] migration: Add counters of updating the dirty bitmap, arei.gonglei, 2014/03/11