All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: cristian.dumitrescu@intel.com, Alan Dewar <alan.dewar@att.com>,
	jasvinder.singh@intel.com
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	dev@dpdk.org, Alan Dewar <alangordondewar@gmail.com>
Subject: Re: [dpdk-dev] [PATCH] sched: add 64-bit counter retrieval API
Date: Thu, 25 Jun 2020 00:51:13 +0200	[thread overview]
Message-ID: <2584526.Ov0XTtHtjM@thomas> (raw)
In-Reply-To: <CAOEQf6h+iRvAgQ_QfitMn8rNdeN+rU3Zto1uS+kkaZxw6eF6ew@mail.gmail.com>

Is this old patch still relevant?


25/07/2018 11:02, Alan Dewar:
> 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:[~2020-06-24 22:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 14:51 [PATCH] sched: add 64-bit counter retrieval API alangordondewar
2018-07-23 12:33 ` Alan Robertson
2018-07-23 16:52 ` Stephen Hemminger
2018-07-25  9:02   ` Alan Dewar
2020-06-24 22:51     ` Thomas Monjalon [this message]
2020-06-25  8:38       ` [dpdk-dev] " 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=2584526.Ov0XTtHtjM@thomas \
    --to=thomas@monjalon.net \
    --cc=alan.dewar@att.com \
    --cc=alangordondewar@gmail.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.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 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.