DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Fady Bader <fady@mellanox.com>
Cc: dev@dpdk.org, thomas@monjalon.net, talshn@mellanox.com,
	dmitry.kozliuk@gmail.com, harini.ramakrishnan@microsoft.com,
	ocardona@microsoft.com, anand.rawat@intel.com,
	ranjit.menon@intel.com
Subject: Re: [dpdk-dev] [PATCH 2/2] timer: support EAL functions on Windows
Date: Sat, 25 Apr 2020 00:32:02 +0300	[thread overview]
Message-ID: <20200425003202.4e0e74b2@Sovereign> (raw)
In-Reply-To: <20200423144350.4016-3-fady@mellanox.com>

On 2020-04-23 17:43 GMT+0300 Fady Bader wrote:
> +uint64_t
> +get_tsc_freq(void)
> +{
> +	uint64_t tsc_freq;
> +	LARGE_INTEGER Frequency;
> +
> +	QueryPerformanceFrequency(&Frequency);
> +	/*
> +	QueryPerformanceFrequency output is in khz.
> +	Mulitply by 1K to obtain the true frequency of the CPU (khz -> hz)
> +	*/
> +	tsc_freq = ((uint64_t)Frequency.QuadPart * 1000);
> +
> +	return tsc_freq;
> +}

QueryPerformanceFrequency() output is in Hz of TSC, not CPU clock. To get
real time interval from TSC difference, we divide that difference to TSC
frequency with no additional 1000 multiplier.

P.S. Fixed my address in Cc.

-- 
Dmitry Kozlyuk

      parent reply	other threads:[~2020-04-24 21:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 14:43 [dpdk-dev] [PATCH 0/2] eal timer split and implementation for Windows Fady Bader
2020-04-23 14:43 ` [dpdk-dev] [PATCH 1/2] timer: move from common to Unix directory Fady Bader
2020-06-17  9:39   ` [dpdk-dev] [PATCH v9 0/2] eal timer split and implementation for Windows Fady Bader
2020-06-17  9:39     ` [dpdk-dev] [PATCH v9 1/2] timer: move from common to Unix directory Fady Bader
2020-06-17  9:39     ` [dpdk-dev] [PATCH v9 2/2] timer: support EAL functions on Windows Fady Bader
2020-06-17 22:15       ` Ranjit Menon
2020-06-18  7:56         ` Fady Bader
2020-06-18  6:55   ` [dpdk-dev] [PATCH v10 0/2] eal timer split and implementation for Windows Fady Bader
2020-06-18  6:55     ` [dpdk-dev] [PATCH v10 1/2] timer: move from common to Unix directory Fady Bader
2020-06-18  6:55     ` [dpdk-dev] [PATCH v10 2/2] timer: support EAL functions on Windows Fady Bader
2020-06-18 19:32     ` [dpdk-dev] [PATCH v10 0/2] eal timer split and implementation for Windows Ranjit Menon
2020-06-23 16:19       ` Thomas Monjalon
2020-04-23 14:43 ` [dpdk-dev] [PATCH 2/2] timer: support EAL functions on Windows Fady Bader
2020-04-23 15:18   ` Dmitry Kozlyuk
2020-04-24 21:32   ` Dmitry Kozlyuk [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=20200425003202.4e0e74b2@Sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=anand.rawat@intel.com \
    --cc=dev@dpdk.org \
    --cc=fady@mellanox.com \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=ocardona@microsoft.com \
    --cc=ranjit.menon@intel.com \
    --cc=talshn@mellanox.com \
    --cc=thomas@monjalon.net \
    /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).