All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Alan Dewar <alan.dewar@att.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"alangordondewar@gmail.com" <alangordondewar@gmail.com>,
	"Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>,
	"Singh, Jasvinder" <jasvinder.singh@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] sched: fix port time rounding error
Date: Tue, 07 Jul 2020 01:01:17 +0200	[thread overview]
Message-ID: <1904548.GDZOGqOs03@thomas> (raw)
In-Reply-To: <CY4PR11MB0072C105F5E0AFEA0F8BFC5AE0690@CY4PR11MB0072.namprd11.prod.outlook.com>

> > 25/06/2020 11:59, alangordondewar@gmail.com:
> > > From: Alan Dewar <alan.dewar@att.com>
> > >
> > > The QoS scheduler works off port time that is computed from the number
> > > of CPU cycles that have elapsed since the last time the port was
> > > polled.   It divides the number of elapsed cycles to calculate how
> > > many bytes can be sent, however this division can generate rounding
> > > errors, where some fraction of a byte sent may be lost.
> > >
> > > Lose enough of these fractional bytes and the QoS scheduler
> > > underperforms.  The problem is worse with low bandwidths.
> > >
> > > To compensate for this rounding error this fix doesn't advance the
> > > port's time_cpu_cycles by the number of cycles that have elapsed, but
> > > by multiplying the computed number of bytes that can be sent (which
> > > has been rounded down) by number of cycles per byte.
> > > This will mean that port's time_cpu_cycles will lag behind the CPU
> > > cycles momentarily.  At the next poll, the lag will be taken into
> > > account.
> > >
> > > v2:
> > > If the cycles value wraps (100 year+) reset the port's cpu cycle back
> > > to zero.
> > >
> > > Fixes: de3cfa2c98 ("sched: initial import")
> > >
> > > Signed-off-by: Alan Dewar <alan.dewar@att.com>
> 
> Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>

Applied, thanks



  reply	other threads:[~2020-07-06 23:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16  8:48 [dpdk-dev] [PATCH] sched: fix port time rounding error alangordondewar
2020-04-17 21:19 ` Dumitrescu, Cristian
2020-04-20 11:23   ` Singh, Jasvinder
2020-04-21  8:21     ` Dewar, Alan
2020-06-24 22:50       ` Thomas Monjalon
2020-06-25  8:32         ` Singh, Jasvinder
2020-06-25  8:40           ` Alan Dewar
2020-06-25  9:59 ` [dpdk-dev] [PATCH v2] " alangordondewar
2020-07-05 20:41   ` Thomas Monjalon
2020-07-06 21:20     ` Singh, Jasvinder
2020-07-06 23:01       ` Thomas Monjalon [this message]
2020-08-20 14:32   ` Kevin Traynor
2020-08-21 15:28     ` Kinsella, Ray
2020-09-07 10:09       ` Kevin Traynor

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=1904548.GDZOGqOs03@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 \
    /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.