Re: [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-22 Thread Paolo Bonzini
On 19/08/2015 20:55, Wanpeng Li wrote: >> The disadvantage is that it adds an overhead of one bit check for all >> kernel exits. A quick tracing shows that the ratio of userspace exits >> after boot is about 1/5 and in subsequent run of nmap and kernel compile >> has about 1/60, so the check

Re: [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-22 Thread Paolo Bonzini
On 19/08/2015 20:55, Wanpeng Li wrote: The disadvantage is that it adds an overhead of one bit check for all kernel exits. A quick tracing shows that the ratio of userspace exits after boot is about 1/5 and in subsequent run of nmap and kernel compile has about 1/60, so the check should not

Re: [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-19 Thread Wanpeng Li
On 8/14/15 6:08 PM, Radim Krčmář wrote: When userspace wants KVM to exit to userspace, it sends a signal. This has a disadvantage of requiring a change to the signal mask because the signal needs to be blocked in userspace to stay pending when sending to self. Using a request flag allows us to

Re: [PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-19 Thread Wanpeng Li
On 8/14/15 6:08 PM, Radim Krčmář wrote: When userspace wants KVM to exit to userspace, it sends a signal. This has a disadvantage of requiring a change to the signal mask because the signal needs to be blocked in userspace to stay pending when sending to self. Using a request flag allows us to

[PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-14 Thread Radim Krčmář
When userspace wants KVM to exit to userspace, it sends a signal. This has a disadvantage of requiring a change to the signal mask because the signal needs to be blocked in userspace to stay pending when sending to self. Using a request flag allows us to shave 200-300 cycles from every userspace

[PATCH v3 2/5] KVM: add KVM_REQ_EXIT request for userspace exit

2015-08-14 Thread Radim Krčmář
When userspace wants KVM to exit to userspace, it sends a signal. This has a disadvantage of requiring a change to the signal mask because the signal needs to be blocked in userspace to stay pending when sending to self. Using a request flag allows us to shave 200-300 cycles from every userspace