Liu ping fan wrote:
Suppose the following scene,
Firstly, creating 10 kvm_vcpu for guest to take the advantage of
multi-core. Now, reclaiming some of the kvm_vcpu, so we can limit the
guest's usage of cpu. Then what about the kvm_vcpu unused? Currently
they are just idle in kernel, but with this
2011/12/15 Takuya Yoshikawa :
> (2011/12/15 13:28), Liu Ping Fan wrote:
>> From: Liu Ping Fan
>>
>> Currently, vcpu can be destructed only when kvm instance destroyed.
>> Change this to vcpu's destruction before kvm instance, so vcpu MUST
>> and CAN be destroyed before kvm's destroy.
>
> Could you
On Thu, Dec 15, 2011 at 03:48:38PM +0900, Takuya Yoshikawa wrote:
> (2011/12/15 13:28), Liu Ping Fan wrote:
> > From: Liu Ping Fan
> >
> > Currently, vcpu can be destructed only when kvm instance destroyed.
> > Change this to vcpu's destruction before kvm instance, so vcpu MUST
> > and CAN be dest
On Thu, Dec 15, 2011 at 5:10 PM, Gleb Natapov wrote:
> On Thu, Dec 15, 2011 at 12:28:48PM +0800, Liu Ping Fan wrote:
>> From: Liu Ping Fan
>>
>> Currently, vcpu can be destructed only when kvm instance destroyed.
>> Change this to vcpu's destruction before kvm instance, so vcpu MUST
>> and CAN be
On Thu, Dec 15, 2011 at 12:28:48PM +0800, Liu Ping Fan wrote:
> From: Liu Ping Fan
>
> Currently, vcpu can be destructed only when kvm instance destroyed.
> Change this to vcpu's destruction before kvm instance, so vcpu MUST
> and CAN be destroyed before kvm's destroy.
>
I see reference counting
On 12/15/2011 04:25 PM, Xiao Guangrong wrote:
> On 12/15/2011 02:53 PM, Liu ping fan wrote:
>
>
>>
+struct kvm_vcpu *kvm_vcpu_get(struct kvm_vcpu *vcpu)
+{
+ if (vcpu == NULL)
+ return NULL;
+ if (atomic_add_unless(&vcpu->refcount, 1, 0))
>>>
>>>
>>>
On 12/15/2011 02:53 PM, Liu ping fan wrote:
>
>>> +struct kvm_vcpu *kvm_vcpu_get(struct kvm_vcpu *vcpu)
>>> +{
>>> + if (vcpu == NULL)
>>> + return NULL;
>>> + if (atomic_add_unless(&vcpu->refcount, 1, 0))
>>
>>
>> Why do not use atomic_inc()?
>> Also, i think a memory barrie
On Thu, Dec 15, 2011 at 1:33 PM, Xiao Guangrong
wrote:
> On 12/15/2011 12:28 PM, Liu Ping Fan wrote:
>
>
>> --- a/arch/x86/kvm/mmu.c
>> +++ b/arch/x86/kvm/mmu.c
>> @@ -1833,11 +1833,12 @@ static void kvm_mmu_put_page(struct kvm_mmu_page
>> *sp, u64 *parent_pte)
>>
>> static void kvm_mmu_reset_la
(2011/12/15 13:28), Liu Ping Fan wrote:
> From: Liu Ping Fan
>
> Currently, vcpu can be destructed only when kvm instance destroyed.
> Change this to vcpu's destruction before kvm instance, so vcpu MUST
> and CAN be destroyed before kvm's destroy.
Could you explain why this change is needed here?
On 12/15/2011 12:28 PM, Liu Ping Fan wrote:
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -1833,11 +1833,12 @@ static void kvm_mmu_put_page(struct kvm_mmu_page *sp,
> u64 *parent_pte)
>
> static void kvm_mmu_reset_last_pte_updated(struct kvm *kvm)
> {
> - int i;
> struc
From: Liu Ping Fan
Currently, vcpu can be destructed only when kvm instance destroyed.
Change this to vcpu's destruction before kvm instance, so vcpu MUST
and CAN be destroyed before kvm's destroy.
Signed-off-by: Liu Ping Fan
---
arch/x86/kvm/i8254.c |8 ++-
arch/x86/kvm/i8259.c |
11 matches
Mail list logo