From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Dewar, Alan" <ad759e@intl.att.com>,
"'alangordondewar@gmail.com'" <alangordondewar@gmail.com>
Cc: "'dev@dpdk.org'" <dev@dpdk.org>,
'Alan Dewar' <alan.dewar@att.com>,
"Kantecki, Tomasz" <tomasz.kantecki@intel.com>,
"Singh, Jasvinder" <jasvinder.singh@intel.com>
Subject: Re: [dpdk-dev] [PATCH v5] sched: make RED scaling configurable
Date: Fri, 12 Jan 2018 11:43:19 +0000 [thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891267BAFC30B@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <3F9268EEC0E43747A5FFFC6B48EF0321FC0CDF@gbcdcmbx03.intl.att.com>
> -----Original Message-----
> From: Dewar, Alan [mailto:ad759e@intl.att.com]
> Sent: Friday, January 12, 2018 10:45 AM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>;
> 'alangordondewar@gmail.com' <alangordondewar@gmail.com>
> Cc: 'dev@dpdk.org' <dev@dpdk.org>; 'Alan Dewar' <alan.dewar@att.com>;
> Kantecki, Tomasz <tomasz.kantecki@intel.com>; Singh, Jasvinder
> <jasvinder.singh@intel.com>
> Subject: RE: [PATCH v5] sched: make RED scaling configurable
>
> Hi Cristian,
>
> > > +
> > > + rte_red_scaling -= count - RTE_RED_SCALING;
> >
> > Why not simply: rte_red_scaling = count?
>
> The RED code stores the moving average in a uint32_t as a pseudo floating
> point number with a fixed sized fractional part of 10 bits.
> This allows a maximum queue length of 1024. To support larger queues,
> the size of the fixed size fractional part needs to be reduced.
>
> To support a maximum queue length of 2048, we need to reduce the size of
> the fractional part to nine bits, for 4096 reduce the fractional part to eight
> bits etc.
>
> Hence the "rte_red_scaling -= count - RTE_RED_SCALING;"
>
> It is just coincidence that RTE_RED_SCALING is 10 and 1024 = 2**10.
>
> I hope that's clear, it took me a time to get my head around it again.
>
> Regards
> Alan
Hi Alan,
After taking to Tomasz, I can also confirm you're right, so let's keep your initial proposal here.
This line of code will only work if this function is called once at most (this was my rationale to suggest the change), but this is fine, as this is enforced by testing the red_init flag when this function starts.
Regards,
Cristian
next prev parent reply other threads:[~2018-01-12 11:43 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1507022514-21831-1>
2018-01-08 15:27 ` alangordondewar
2018-01-11 13:11 ` Dumitrescu, Cristian
2018-01-12 9:38 ` Dewar, Alan
2018-01-12 11:09 ` Dumitrescu, Cristian
2018-01-12 11:52 ` Dumitrescu, Cristian
2018-01-15 15:36 ` Dewar, Alan
2018-01-16 11:56 ` Dumitrescu, Cristian
2018-01-12 10:44 ` Dewar, Alan
2018-01-12 11:43 ` Dumitrescu, Cristian [this message]
2018-01-15 16:16 ` [dpdk-dev] [PATCH v6] " alangordondewar
2018-01-15 16:52 ` Stephen Hemminger
2018-01-16 15:50 ` Alan Dewar
2018-01-16 15:57 ` Alan Dewar
2018-01-16 16:44 ` Dumitrescu, Cristian
2018-01-16 16:07 ` [dpdk-dev] [PATCH v7] " alangordondewar
2019-04-05 15:36 ` Ferruh Yigit
2019-04-05 15:36 ` Ferruh Yigit
2019-04-08 8:24 ` Alan Dewar
2019-04-08 8:24 ` Alan Dewar
2019-04-08 8:53 ` Thomas Monjalon
2019-04-08 8:53 ` Thomas Monjalon
2019-04-08 13:29 ` Dumitrescu, Cristian
2019-04-08 13:29 ` Dumitrescu, Cristian
2020-07-06 23:09 ` 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=3EB4FA525960D640B5BDFFD6A3D891267BAFC30B@IRSMSX108.ger.corp.intel.com \
--to=cristian.dumitrescu@intel.com \
--cc=ad759e@intl.att.com \
--cc=alan.dewar@att.com \
--cc=alangordondewar@gmail.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=tomasz.kantecki@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 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).