[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 5/8] XBZRLE: optimize XBZRLE to decrease the
From: |
陈梁 |
Subject: |
Re: [Qemu-devel] [PATCH v4 5/8] XBZRLE: optimize XBZRLE to decrease the cache misses |
Date: |
Thu, 03 Apr 2014 23:36:53 +0800 |
> * ???? (address@hidden) wrote:
>
> <snip>
>
>> Hi Dave, is it ok?
>>
>> - if (it->it_data &&
>> + if (it->it_data && it->it_addr != addr &&
>> it->it_age + CACHED_PAGE_LIFETIME > current_age) {
>>
>
> I've not had a chance to retry it yet; did you try google stressapptest on it?
>
> Dave
yes, I try google stressapptest on it. The problem has gone.
>
>> ChenLiang
>>>> + return -1;
>>>> + }
>>>> /* allocate page */
>>>> if (!it->it_data) {
>>>> it->it_data = g_try_malloc(cache->page_size);
>>>> @@ -173,7 +188,7 @@ int cache_insert(PageCache *cache, uint64_t addr,
>>>> const uint8_t *pdata)
>>>>
>>>> memcpy(it->it_data, pdata, cache->page_size);
>>>>
>>>> - it->it_age = ++cache->max_item_age;
>>>> + it->it_age = current_age;
>>>> it->it_addr = addr;
>>>>
>>>> return 0;
>>>> --
>>>> 1.7.12.4
>>>>
>>>>
>>>>
>>> --
>>> Dr. David Alan Gilbert / address@hidden / Manchester, UK
>>>
>>
> --
> Dr. David Alan Gilbert / address@hidden / Manchester, UK