lkml.org 
[lkml]   [2023]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: x86: Use fast path for Xen timer delivery
From
Date
On Fri, 2023-09-22 at 10:20 +0100, David Woodhouse wrote:
> From: David Woodhouse <dwmw@amazon.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@amazon.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.
[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2023-09-27 18:51    [W:0.056 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site