All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: arei.gonglei@huawei.com
Cc: ChenLiang <chenliang88@huawei.com>,
	weidong.huang@huawei.com, qemu-devel@nongnu.org,
	owasserm@redhat.com, pbonzini@redhat.com
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	[thread overview]
Message-ID: <87siqo1m0v.fsf@elfo.mitica> (raw)
In-Reply-To: <1394542415-5152-9-git-send-email-arei.gonglei@huawei.com> (arei gonglei's message of "Tue, 11 Mar 2014 20:53:33 +0800")

<arei.gonglei@huawei.com> wrote:
> From: ChenLiang <chenliang88@huawei.com>
>
> Signed-off-by: ChenLiang <chenliang88@huawei.com>
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>


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;

  parent reply	other threads:[~2014-03-11 21:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-11 12:53 [Qemu-devel] [PATCH 00/10] migration: Optimization the xbzrle and fix two corruption issues arei.gonglei
2014-03-11 12:53 ` [Qemu-devel] [PATCH 01/10] XBZRLE: Fix one XBZRLE " arei.gonglei
2014-03-11 20:26   ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 02/10] migration: Add counters of updating the dirty bitmap arei.gonglei
2014-03-11 13:09   ` Eric Blake
2014-03-11 13:34     ` Gonglei (Arei)
2014-03-11 20:28       ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 03/10] XBZRLE: optimize XBZRLE to decrease the cache missing arei.gonglei
2014-03-11 20:34   ` Juan Quintela
2014-03-18 12:20     ` Gonglei (Arei)
2014-03-11 20:52   ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 04/10] XBZRLE: rebuild the cache_is_cached function arei.gonglei
2014-03-11 13:11   ` Eric Blake
2014-03-11 20:37   ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process arei.gonglei
2014-03-11 20:48   ` Juan Quintela
2014-03-11 20:55     ` Eric Blake
2014-03-11 22:56     ` Chegu Vinod
2014-03-18 12:23       ` Gonglei (Arei)
2014-03-11 12:53 ` [Qemu-devel] [PATCH 06/10] migraion: optimiztion xbzrle by reducing data copy arei.gonglei
2014-03-11 20:56   ` Juan Quintela
2014-03-11 20:56   ` Juan Quintela
2014-03-11 20:58   ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 07/10] migraion: clear the death code arei.gonglei
2014-03-11 20:58   ` Juan Quintela
2014-03-11 20:59   ` Eric Blake
2014-03-11 12:53 ` [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age arei.gonglei
2014-03-11 21:02   ` Eric Blake
2014-03-11 21:08   ` Juan Quintela [this message]
2014-03-11 12:53 ` [Qemu-devel] [PATCH 09/10] migration: expose the bitmap_sync_cnt to the end user arei.gonglei
2014-03-11 13:22   ` Eric Blake
2014-03-11 21:10   ` Juan Quintela
2014-03-11 12:53 ` [Qemu-devel] [PATCH 10/10] XBZRLE: update the doc of XBZRLE arei.gonglei
2014-03-11 21:09   ` Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87siqo1m0v.fsf@elfo.mitica \
    --to=quintela@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=chenliang88@huawei.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.