All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Julien Grall <julien@xen.org>
Cc: "Julien Grall" <jgrall@amazon.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/2] xen/x86: ioapic: Bail out from timer_irq_works() as soon as possible
Date: Thu, 14 Dec 2023 11:19:15 +0100	[thread overview]
Message-ID: <6c5fd48d-a417-4731-8611-4f5f97865d91@suse.com> (raw)
In-Reply-To: <20231211122322.15815-3-julien@xen.org>

On 11.12.2023 13:23, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> Currently timer_irq_works() will wait the full 100ms before checking
> that pit0_ticks has been incremented at least 4 times.
> 
> However, the bulk of the BIOS/platform should not have a buggy timer.
> So waiting for the full 100ms is a bit harsh.
> 
> Rework the logic to only wait until 100ms passed or we saw more than
> 4 ticks. So now, in the good case, this will reduce the wait time
> to ~50ms.

Isn't this more like 40ms (4 ticks 10ms apart)? And really somewhere
between 30 and 40, because the first tick has already partly elapsed?

> Take the opportunity to change the prototype of timer_irq_works() to
> return a bool rather than int (which was already acting as a bool because
> only 0/1 could be returned).
> 
> Signed-off-by: Julien Grall <jgrall@amazon.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


      reply	other threads:[~2023-12-14 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11 12:23 [PATCH v2 0/2] xen/x86: Optimize timer_irq_works() Julien Grall
2023-12-11 12:23 ` [PATCH v2 1/2] xen/x86: io_apic: Introduce a command line option to skip timer check Julien Grall
2023-12-14 10:10   ` Jan Beulich
2023-12-14 10:14     ` Julien Grall
2023-12-14 10:35       ` Jan Beulich
2024-01-02 19:09         ` Julien Grall
2024-01-04  8:54           ` Jan Beulich
2024-01-15 12:42             ` Roger Pau Monné
2023-12-11 12:23 ` [PATCH v2 2/2] xen/x86: ioapic: Bail out from timer_irq_works() as soon as possible Julien Grall
2023-12-14 10:19   ` Jan Beulich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c5fd48d-a417-4731-8611-4f5f97865d91@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.