[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 06/10] XBZRLE: rebuild the cache_is_cached fu
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 06/10] XBZRLE: rebuild the cache_is_cached function |
Date: |
Thu, 20 Mar 2014 14:09:48 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/20/2014 01:44 PM, Eric Blake wrote:
> On 03/18/2014 06:24 AM, address@hidden wrote:
>> From: ChenLiang <address@hidden>
>>
>> Rebuild the cache_is_cached function by cache_get_by_addr.
>>
>> Signed-off-by: ChenLiang <address@hidden>
>> Signed-off-by: Gonglei <address@hidden>
>> ---
>> page_cache.c | 38 ++++++++++++++++----------------------
>> 1 file changed, 16 insertions(+), 22 deletions(-)
>>
>
>> int cache_insert(PageCache *cache, uint64_t addr, const uint8_t *pdata,
>> uint64_t current_age)
>> {
>>
>> - CacheItem *it = NULL;
>> -
>> - g_assert(cache);
>> - g_assert(cache->page_cache);
>> + CacheItem *it;
>
> Why are you dropping the asserts?
And if the answer is "because the caller is also asserting the same
thing", then mention it in the commit message. The best commit messages
are the ones that not only mention WHAT (no silent changes), but also WHY.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 07/10] migration: Fix the migrate auto converge process, (continued)
- [Qemu-devel] [PATCH v3 07/10] migration: Fix the migrate auto converge process, arei.gonglei, 2014/03/18
- [Qemu-devel] [PATCH v3 05/10] XBZRLE: optimize XBZRLE to decrease the cache missing, arei.gonglei, 2014/03/18
- [Qemu-devel] [PATCH v3 10/10] XBZRLE: update the doc of XBZRLE, arei.gonglei, 2014/03/18
- [Qemu-devel] [PATCH v3 03/10] migration: expose the bitmap_sync_counter to the end user, arei.gonglei, 2014/03/18
- [Qemu-devel] [PATCH v3 06/10] XBZRLE: rebuild the cache_is_cached function, arei.gonglei, 2014/03/18
- [Qemu-devel] [PATCH v3 09/10] migration: clear the dead code, arei.gonglei, 2014/03/18
- Re: [Qemu-devel] [PATCH v3 00/10] migration: Optimizate the xbzrle and fix two corruption issues, Eric Blake, 2014/03/20