All of lore.kernel.org
 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, yohadt@mellanox.com,
	harini.ramakrishnan@microsoft.com, ocardona@microsoft.com,
	anand.rawat@intel.com, ranjit.menon@intel.com
Subject: Re: [dpdk-dev] [PATCH v5 3/3] timer: support EAL functions on Windows
Date: Thu, 7 May 2020 23:54:04 +0300	[thread overview]
Message-ID: <20200507235404.46605f64@Sovereign> (raw)
In-Reply-To: <20200507130531.624-4-fady@mellanox.com>

On 2020-05-07 16:05 GMT+0300 Fady Bader wrote:
> Implemented the needed Windows eal timer functions.
[snip]
> +void
> +rte_delay_us_sleep(unsigned int us)
> +{
> +	LARGE_INTEGER start, end;
> +	LARGE_INTEGER freq;
> +
> +	QueryPerformanceCounter(&start);
> +	QueryPerformanceFrequency(&freq);
> +
> +	LARGE_INTEGER ticks;
> +	ticks.QuadPart = freq.QuadPart * us / US_PER_SEC;
> +
> +	QueryPerformanceCounter(&end);
> +	while ((end.QuadPart - start.QuadPart) < ticks.QuadPart) {
> +		rte_pause();
> +		QueryPerformanceCounter(&end);
> +	}
> +}

Your previous implementation was correct, this one is not. Per documentation,
rte_delay_us_sleep() should *sleep* in an OS-dependent way, like you did with
waitable timers previously, while rte_delay_us() does a busy loop like this.
Please restore this function from v4, the rest LGTM.

P.S. Fixed my email in Cc.

-- 
Dmitry Kozlyuk

      reply	other threads:[~2020-05-07 20:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 13:05 [dpdk-dev] [PATCH v5 0/3] eal timer split and implementation for Windows Fady Bader
2020-05-07 13:05 ` [dpdk-dev] [PATCH v5 1/3] timer: move from common to Unix directory Fady Bader
2020-05-07 13:05 ` [dpdk-dev] [PATCH v5 2/3] eal: proc type function for Windows Fady Bader
2020-05-07 13:05 ` [dpdk-dev] [PATCH v5 3/3] timer: support EAL functions on Windows Fady Bader
2020-05-07 20:54   ` 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=20200507235404.46605f64@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 \
    --cc=yohadt@mellanox.com \
    /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.