[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail)
From: |
陈蒙蒙 |
Subject: |
Re: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail) |
Date: |
Mon, 9 Mar 2020 11:16:10 +0000 |
Thanks, in fact,do_touch_pages is called just when vm starts up, but using
init flag and Gonce maybe more elegant !
if needed,I can submit a new patch !
thanks very much!
bauerchen
From: Christian Borntraeger
Date: 2020-03-09 19:01
To: Paolo Bonzini; Igor Mammedov
CC: qemu-devel; qemu-s390x; Marc Hartmayer; bauerchen(陈蒙蒙)
Subject: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail)
On 09.03.20 11:05, Paolo Bonzini wrote:
> On 09/03/20 11:03, Igor Mammedov wrote:
>>> + qemu_cond_init(&page_cond);
>>> + qemu_mutex_init(&page_mutex);
>> Is it possible for touch_all_pages to be called several times?
>> If it's then it probably needs a guard against that to make
>> sure it won't explode, something like:
>>
>> static bool page_mutex_inited;
>>
>> if(page_mutex_inited)
>> page_mutex_inited = true
>> qemu_mutex_init(&page_mutex)
>> ...
>>
>
> Hmm, good idea, it should also use GOnce.
Maybe start with a revert and let the original submitter send
a fixed up patch?
- [PATCH] mem-prealloc: initialize cond and mutex, Christian Borntraeger, 2020/03/06
- Re: [PATCH] mem-prealloc: initialize cond and mutex, Paolo Bonzini, 2020/03/06
- 回复: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail), 陈蒙蒙, 2020/03/06
- Re: [PATCH] mem-prealloc: initialize cond and mutex, Igor Mammedov, 2020/03/09
- Re: [PATCH] mem-prealloc: initialize cond and mutex, Paolo Bonzini, 2020/03/09
- Re: [PATCH] mem-prealloc: initialize cond and mutex, Christian Borntraeger, 2020/03/09
- Re: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail),
陈蒙蒙 <=
- Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail), Igor Mammedov, 2020/03/09
- Re: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail), 陈蒙蒙, 2020/03/10
- Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail), Paolo Bonzini, 2020/03/11
- Re: Re: [PATCH] mem-prealloc: initialize cond and mutex(Internet mail), 陈蒙蒙, 2020/03/12