From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"Erik Gabriel Carrillo" <erik.g.carrillo@intel.com>,
"David Marchand" <david.marchand@redhat.com>,
"Maria Lingemark" <maria.lingemark@ericsson.com>,
"Stefan Sundkvist" <stefan.sundkvist@ericsson.com>,
"Morten Brørup" <mb@smartsharesystems.com>,
"Tyler Retzlaff" <roretzla@linux.microsoft.com>,
"Mattias Rönnblom" <hofors@lysator.liu.se>
Subject: Re: [RFC v2 2/2] eal: add high-performance timer facility
Date: Wed, 12 Jul 2023 08:58:34 +0000 [thread overview]
Message-ID: <e5e79d52-d28c-3697-29cb-0fbc2c36d730@ericsson.com> (raw)
In-Reply-To: <20230706154105.430209bf@hermes.local>
On 2023-07-07 00:41, Stephen Hemminger wrote:
> On Wed, 15 Mar 2023 18:03:42 +0100
> Mattias Rönnblom <mattias.ronnblom@ericsson.com> wrote:
>
>> The htimer library attempts at providing a timer facility with roughly
>> the same functionality, but less overhead and better scalability than
>> DPDK timer library.
>
> I don't understand. Why not just fix and extend existing timers.
> Sure you will need to add some API's and maybe drop some of the existing
> experimental ones (ie alt_timer). Even change the ABI.
>
> It would be better to have one high performance, scaleable timer than
> spend the next 3 years telling users which one to use and why!
>
> So please make rte_timer work better in 23.11 release rather
> than reinventing a new variant.
I wanted to explore how a data plane timer API should look like.
Something like a "first principles" type approach. As it happens, it
seems like I will converge on something that's pretty similar to how
rte_timer (and most kernel timers) API works, for example in regards to
timer memory allocation.
Clearly, there should not be two DPDK timer APIs that provide the same
functionality. That was never the intention. Since so much DPDK code and
more importantly application code depends on <rte_timer.h> it wasn't
obvious that the best option was make extensive changes to rte_timer API
and implementation. One way that seemed like a plausible option (how
much so depending on the extend of the rte_timer vs rte_htimer API
differences) was to have a new API, and depreciate <rte_timer.h> in the
release htimer was introduced.
That said, at this point, it's not clear to me which option is the best
one of "making extensive changes to rte_timer" or "having rte_htimer on
the side for a couple of releases".
An imaginary alternative where the <rte_timer.h> API/ABI can be
maintained, and you get all the performance and scalability and improved
API semantics of htimer, would obviously be the best option. But I don't
think that is possible. Especially not if you want to end up with a
nice, orthogonal API and a clean implementation.
I think changes in both ABI and API are inevitable, and a good thing,
considering some of the quirks for the current API.
A side note: It seems to me at this point there should be two public
timer APIs, but providing different functionality, at slightly different
levels of abstraction. One is the <rte_timer.h> lookalike, and the other
what in the current patchset is represented by <rte_htw.h>, but minus
the callbacks, as per Morten Brørup's suggestion. The latter would be a
low-level HTW only, with no MT safety, no lcore knowledge, no opinions
on time source, etc.
next prev parent reply other threads:[~2023-07-12 8:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 9:39 [RFC 0/2] Add " Mattias Rönnblom
2023-02-28 9:39 ` [RFC 1/2] eal: add bitset type Mattias Rönnblom
2023-02-28 18:46 ` Tyler Retzlaff
2023-03-02 6:31 ` Mattias Rönnblom
2023-03-02 20:39 ` Tyler Retzlaff
2023-02-28 9:39 ` [RFC 2/2] eal: add high-performance timer facility Mattias Rönnblom
2023-03-05 17:25 ` Stephen Hemminger
2023-03-09 15:20 ` Mattias Rönnblom
2023-02-28 16:01 ` [RFC 0/2] Add " Morten Brørup
2023-03-01 11:18 ` Mattias Rönnblom
2023-03-01 13:31 ` Morten Brørup
2023-03-01 15:50 ` Mattias Rönnblom
2023-03-01 17:06 ` Morten Brørup
2023-03-15 17:03 ` [RFC v2 " Mattias Rönnblom
2023-03-15 17:03 ` [RFC v2 1/2] eal: add bitset type Mattias Rönnblom
2023-03-15 17:20 ` Stephen Hemminger
2023-03-15 18:27 ` Mattias Rönnblom
2023-03-15 17:03 ` [RFC v2 2/2] eal: add high-performance timer facility Mattias Rönnblom
2023-03-16 3:55 ` Tyler Retzlaff
2023-03-17 1:58 ` Stephen Hemminger
2023-03-22 12:18 ` Morten Brørup
2023-04-03 12:04 ` Mattias Rönnblom
2023-04-04 7:32 ` Morten Brørup
2023-03-24 16:00 ` Morten Brørup
2023-07-06 22:41 ` Stephen Hemminger
2023-07-12 8:58 ` Mattias Rönnblom [this message]
2024-10-03 18:36 ` [RFC v2 0/2] Add " Stephen Hemminger
2024-10-03 21:32 ` Morten Brørup
2024-10-06 13:02 ` Mattias Rönnblom
2024-10-06 13:43 ` Morten Brørup
2024-10-06 14:43 ` Mattias Rönnblom
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=e5e79d52-d28c-3697-29cb-0fbc2c36d730@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=hofors@lysator.liu.se \
--cc=maria.lingemark@ericsson.com \
--cc=mb@smartsharesystems.com \
--cc=roretzla@linux.microsoft.com \
--cc=stefan.sundkvist@ericsson.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 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).