Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-19 Thread Avi Kivity
Jan Kiszka wrote: If you have dozens of lapics, you don't want to check them all if they are ALL switched of anyway. That information is better encoded in a single, (virtual) system-wide bool. That's the most common case we want to speed up. And it is the core of the optimization Avi suggested (u

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Jan Kiszka
Sheng Yang wrote: > On Fri, Oct 17, 2008 at 07:40:00PM +0200, Jan Kiszka wrote: >> Sheng Yang wrote: >>> On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: Sheng Yang wrote: > On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: >> As suggested by Avi, this patch introd

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:40:00PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: > >> Sheng Yang wrote: > >>> On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > As suggested by Avi, this patch introduces a counter of VCP

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Jan Kiszka
Sheng Yang wrote: > On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: >> Sheng Yang wrote: >>> On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: As suggested by Avi, this patch introduces a counter of VCPUs that have LVT0 set to NMI mode. Only if the counter > 0, we pu

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Fri, Oct 17, 2008 at 07:23:01PM +0200, Jan Kiszka wrote: > Sheng Yang wrote: > > On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > >> As suggested by Avi, this patch introduces a counter of VCPUs that have > >> LVT0 set to NMI mode. Only if the counter > 0, we push the PIT ticks via

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Jan Kiszka
Sheng Yang wrote: > On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: >> As suggested by Avi, this patch introduces a counter of VCPUs that have >> LVT0 set to NMI mode. Only if the counter > 0, we push the PIT ticks via >> all LAPIC LVT0 lines to enable NMI watchdog support. >> > > I fe

Re: [PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-17 Thread Sheng Yang
On Wed, Oct 15, 2008 at 04:27:51PM +0200, Jan Kiszka wrote: > As suggested by Avi, this patch introduces a counter of VCPUs that have > LVT0 set to NMI mode. Only if the counter > 0, we push the PIT ticks via > all LAPIC LVT0 lines to enable NMI watchdog support. > I feel a little strange about:

[PATCH 3/3] KVM: x86: Optimize NMI watchdog delivery

2008-10-15 Thread Jan Kiszka
As suggested by Avi, this patch introduces a counter of VCPUs that have LVT0 set to NMI mode. Only if the counter > 0, we push the PIT ticks via all LAPIC LVT0 lines to enable NMI watchdog support. Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> --- arch/x86/kvm/i8254.c | 13 +++--