[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <74df3c302d26300f9114638d3ed6c2f565974bc6.camel@infradead.org>
Date: Wed, 27 Sep 2023 08:42:40 +0200
From: David Woodhouse <dwmw2@...radead.org>
To: kvm <kvm@...r.kernel.org>
Cc: Paul Durrant <paul@....org>,
Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
"Griffoul, Fred" <fgriffo@...zon.com>
Subject: Re: [PATCH] KVM: x86: Use fast path for Xen timer delivery
On Fri, 2023-09-22 at 10:20 +0100, David Woodhouse wrote:
> From: David Woodhouse <dwmw@...zon.co.uk>
>
> Most of the time there's no need to kick the vCPU and deliver the timer
> event through kvm_xen_inject_timer_irqs(). Use kvm_xen_set_evtchn_fast()
> directly from the timer callback, and only fall back to the slow path
> when it's necessary to do so.
>
> This gives a significant improvement in timer latency testing (using
> nanosleep() for various periods and then measuring the actual time
> elapsed).
>
> Signed-off-by: David Woodhouse <dwmw@...zon.co.uk>
Hm, scratch that. It brings back the race condition Paolo talks about in
https://lore.kernel.org/kvm/0709ac62f664c0f3123fcdeabed3b79038cef3b6.camel@infradead.org/T/
Well, not *quite*... there's no race with clearing timer_expires
because I forgot to clear it at all :)
I think I'll be able to fix it up with an hrtimer_cancel() in the rare
ioctl attr_get path to avoid the race.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)
Powered by blists - more mailing lists