DPDK patches and discussions
 help / color / mirror / Atom feed
From: Isaac Boukris <iboukris@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, bruce.richardson@intel.com,
	roretzla@linux.microsoft.com,  dmitry.kozliuk@gmail.com,
	david.marchand@redhat.com
Subject: Re: [PATCH v3 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq
Date: Wed, 2 Oct 2024 00:56:29 +0300	[thread overview]
Message-ID: <CAC-fF8SY+MMhZx1+5zNaoTkw5MMdOv29NR6MvmUA+68hBmqbQQ@mail.gmail.com> (raw)
In-Reply-To: <20241001081939.7cf14c2d@hermes.local>

On Tue, Oct 1, 2024 at 6:22 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Tue,  1 Oct 2024 03:22:51 +0300
> Isaac Boukris <iboukris@gmail.com> wrote:
>
> > diff --git a/lib/eal/windows/eal_timer.c b/lib/eal/windows/eal_timer.c
> > index b070cb7751..cfd6c267ac 100644
> > --- a/lib/eal/windows/eal_timer.c
> > +++ b/lib/eal/windows/eal_timer.c
> > @@ -49,13 +49,16 @@ rte_delay_us_sleep(unsigned int us)
> >  }
> >
> >  uint64_t
> > -get_tsc_freq(void)
> > +get_tsc_freq(uint64_t arch_hz)
> >  {
> >       LARGE_INTEGER t_start, t_end, elapsed_us;
> >       LARGE_INTEGER frequency;
> >       uint64_t tsc_hz;
> >       uint64_t end, start;
> >
> > +     if (arch_hz)
> > +             return arch_hz;
> > +
> >       QueryPerformanceFrequency(&frequency);
> >
> >       QueryPerformanceCounter(&t_start);
> > --
>
> On Windows, I would not use arch_hz at all, since it is opaque how
> the Windows kernel determines the frequency, and best not to get
> skew.

Not sure I follow, currently the patch doesn't change the behavior for
Windows, and the Windows code is quite similar to the Linux one,
should we always prefer the measured value in Windows?

On the other hand, I think I should update the rounding commit to also
change the Windows code, there is no sense in 10MHz rounding there
either.

  reply	other threads:[~2024-10-01 21:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-21 14:00 [PATCH 1/2] timer/linux: lower rounding of tsc estimation to 10KHz Isaac Boukris
2024-09-21 14:00 ` [PATCH 2/2] timer/linux: override TSC freq if no tsc_known_freq Isaac Boukris
2024-09-24 17:04   ` Isaac Boukris
2024-09-30 15:04     ` Bruce Richardson
2024-09-30 22:08 ` [PATCH v2 0/2] Improve TSC frequency accuracy on Linux Isaac Boukris
2024-09-30 22:08   ` [PATCH v2 1/2] timer/linux: lower rounding of tsc estimation to 100KHz Isaac Boukris
2024-09-30 22:08   ` [PATCH v2 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq Isaac Boukris
2024-10-01  0:10     ` Stephen Hemminger
2024-10-01  0:22 ` [PATCH v3 0/2] Improve TSC frequency accuracy on Linux Isaac Boukris
2024-10-01  0:22   ` [PATCH v3 1/2] timer/linux: lower rounding of tsc estimation to 100KHz Isaac Boukris
2024-10-01 15:18     ` Stephen Hemminger
2024-10-01  0:22   ` [PATCH v3 2/2] timer/linux/x86: override TSC freq if no tsc_known_freq Isaac Boukris
2024-10-01 15:19     ` Stephen Hemminger
2024-10-01 21:56       ` Isaac Boukris [this message]
2024-10-01 20:01     ` Bruce Richardson
2024-10-01 21:59       ` Isaac Boukris
2024-10-02  8:06         ` Bruce Richardson
2024-10-02 16:56 ` [PATCH v4 0/2] Improve TSC frequency accuracy Isaac Boukris
2024-10-02 16:56   ` [PATCH v4 1/2] timer: lower rounding of TSC estimation to 100KHz Isaac Boukris
2024-10-02 16:56   ` [PATCH v4 2/2] timer: allow platform to override cpu TSC frequency Isaac Boukris
2024-10-02 17:11     ` Bruce Richardson
2024-10-02 19:14       ` Isaac Boukris
2024-10-03  9:31         ` Bruce Richardson
2024-10-03 12:29           ` Isaac Boukris
2024-10-02 17:12   ` [PATCH v4 0/2] Improve TSC frequency accuracy Bruce Richardson
2024-10-03 12:26 ` [PATCH v5 " Isaac Boukris
2024-10-03 12:26   ` [PATCH v5 1/2] timer: lower rounding of TSC estimation to 100KHz Isaac Boukris
2024-10-03 14:05     ` Bruce Richardson
2024-10-03 15:13       ` Stephen Hemminger
2024-10-08  7:56         ` David Marchand
2024-10-03 12:26   ` [PATCH v5 2/2] timer: allow platform to override cpu TSC frequency Isaac Boukris
2024-10-03 14:06     ` Bruce Richardson
2024-10-03 15:14       ` Stephen Hemminger

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=CAC-fF8SY+MMhZx1+5zNaoTkw5MMdOv29NR6MvmUA+68hBmqbQQ@mail.gmail.com \
    --to=iboukris@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).