DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Robert Sanford <rsanford@akamai.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/3] timer: inform periodic timers of multiple expiries
Date: Fri, 30 Jun 2017 12:14:31 +0200	[thread overview]
Message-ID: <20170630121431.0899f624@platinum> (raw)
In-Reply-To: <20170531091621.203189-2-bruce.richardson@intel.com>

Hi Bruce,

On Wed, 31 May 2017 10:16:19 +0100, Bruce Richardson <bruce.richardson@intel.com> wrote:
> if timer_manage is called much less frequently than the period of a
> periodic timer, then timer expiries will be missed. For example, if a timer
> has a period of 300us, but timer_manage is called every 1ms, then there
> will only be one timer callback called every 1ms instead of 3 within that
> time.
> 
> While we can fix this by having each function called multiple times within
> timer-manage, this will lead to out-of-order timeouts, and will be slower
> with all the function call overheads - especially in the case of a timeout
> doing something trivial like incrementing a counter. Therefore, we instead
> modify the callback functions to take a counter value of the number of
> expiries that have passed since the last time it was called.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> 

Sorry, it's probably a bit late to react. If it's too late, nevermind.
I'm not really convinced that adding another argument to the callback
function is the best solution.

Invoking the callbacks several times would result in a much smaller patch
that does not need a heavy ABI compat.

I'm not sure the function call overhead is really significant in that
case. I'm not sure I understand your point related to out-of-order timeouts,
nor I see why this patchset would behave better.

About the problem itself, my understanding was that the timer manage
function has to be called frequently enough to process the timers.


Olivier

  reply	other threads:[~2017-06-30 10:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 13:25 [dpdk-dev] [RFC PATCH] " Bruce Richardson
2017-04-28 13:29 ` Bruce Richardson
2017-04-28 13:30 ` Bruce Richardson
2017-05-31  9:16 ` [dpdk-dev] [PATCH 0/3] " Bruce Richardson
2017-05-31  9:16   ` [dpdk-dev] [PATCH 1/3] " Bruce Richardson
2017-06-30 10:14     ` Olivier Matz [this message]
2017-06-30 12:06       ` Bruce Richardson
2017-05-31  9:16   ` [dpdk-dev] [PATCH 2/3] timer: add symbol versions for ABI compatibility Bruce Richardson
2017-05-31  9:16   ` [dpdk-dev] [PATCH 3/3] test/test: add test for multiple timer expiries Bruce Richardson

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=20170630121431.0899f624@platinum \
    --to=olivier.matz@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=rsanford@akamai.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).