DPDK patches and discussions
 help / color / mirror / Atom feed
From: Alan Dewar <alangordondewar@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: cristian.dumitrescu@intel.com, dev@dpdk.org,
	 Alan Dewar <alan.dewar@att.com>
Subject: Re: [dpdk-dev] [PATCH] sched: add 64-bit counter retrieval API
Date: Wed, 25 Jul 2018 10:02:23 +0100	[thread overview]
Message-ID: <CAOEQf6h+iRvAgQ_QfitMn8rNdeN+rU3Zto1uS+kkaZxw6eF6ew@mail.gmail.com> (raw)
In-Reply-To: <20180723095252.4a93ea91@xeon-e3>

Hi Stephen,

Sorry about the delay in responding to your comment.

Maybe I'm missing something but I don't consider 64-bit counter
rollover to be a problem.
The DPDK QoS stats are just 32-bits wide and are zeroed when read.  So
if we read them frequently enough the 32-bit counters won't wrap.

This new API is just a convenient way to read the 32-bit counters into
variables that are 64-bit wide which allows Vyatta to have a common
API slightly above the DPDK.

I'd hope that at some point in time the DPDK will move to 64-bit
counters, but there may be technical reasons why this can't happen
that I'm not aware of (support for 32-bit CPUs??)

Regards
Alan

On Mon, Jul 23, 2018 at 5:52 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Wed, 18 Jul 2018 15:51:39 +0100
> alangordondewar@gmail.com wrote:
>
>> From: Alan Dewar <alan.dewar@att.com>
>>
>> Add new APIs to retrieve counters in 64-bit wide fields.
>>
>> Signed-off-by: Alan Dewar <alan.dewar@att.com>
>
> Do you want to consider 64 bit counter roll over on 32 bit platform?
> The problem is that incrementing an 64 bit value is not atomic on
> 32 bit cpu. The carry operation can race with reading.
>
> The kernel has special case code to do restartable sequence for
> accessing 64 bit counter on 32 bit CPU. These functions become
> nop's on 64bit.

  reply	other threads:[~2018-07-25  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 14:51 alangordondewar
2018-07-23 12:33 ` Alan Robertson
2018-07-23 16:52 ` Stephen Hemminger
2018-07-25  9:02   ` Alan Dewar [this message]
2020-06-24 22:51     ` Thomas Monjalon
2020-06-25  8:38       ` Singh, Jasvinder
2020-06-25  9:16         ` Thomas Monjalon

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=CAOEQf6h+iRvAgQ_QfitMn8rNdeN+rU3Zto1uS+kkaZxw6eF6ew@mail.gmail.com \
    --to=alangordondewar@gmail.com \
    --cc=alan.dewar@att.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --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).