Skip to content

timer library enhancement

Erik Gabriel Carrillo dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 3 repliesIn review
  2. v33 patches 2 repliesSuperseded
  3. v23 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches7 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3timer: add multiple pending lists option for each lcorelib/librte_timer/rte_timer.c lib/librte_timer/rte_timer.h lib/librte_timer/rte_timer_version.map+287 -1240 replies
2/3timer: handle timers installed from non-EAL threadslib/librte_timer/rte_timer.c+12 -40 replies
3/3doc: update timer lib docsdoc/guides/prog_guide/timer_lib.rst doc/guides/rel_notes/release_17_11.rst+26 -120 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJohn McNamara
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] timer library enhancement

In the current implementation of the DPDK timer library, timers can be created and set to be handled by a target lcore by adding it to a skiplist that corresponds to that lcore. However, if an application enables multiple lcores, and each of these lcores repeatedly attempts to install timers on the same target lcore, overall application throughput will be reduced as all lcores contend to acquire the lock guarding the single skiplist of pending timers.

This patchset addresses this scenario by adding an option to enable an array of skiplists in each lcore's priv_timer struct. Then, when lcore i installs a timer on lcore k, the timer will be added to the ith skiplist for lcore k. If lcore j installs a timer on lcore k simultaneously, lcores i and j can both proceed since they will be acquiring different locks for different lists. This functionality is off by default, and can be enabled via a new function.

When lcore k processes its pending timers, if the multiple pending list option is enabled, it will traverse skiplists in its array and acquire the current skiplist's lock while a run list is broken out; meanwhile, all other lists can continue to be modified. Then, all run lists for lcore k are collected and traversed together so timers are executed in their relative order. If the multiple pending list option is not enabled (the default), only a single list will be traversed, as before.

Erik Gabriel Carrillo (3):
timer: add multiple pending lists option for each lcore
timer: handle timers installed from non-EAL threads
doc: update timer lib docs

 doc/guides/prog_guide/timer_lib.rst    |  31 +--
 doc/guides/rel_notes/release_17_11.rst |   7 +
 lib/librte_timer/rte_timer.c           | 384 ++++++++++++++++++++++-----------
 lib/librte_timer/rte_timer.h           |  29 ++-
 lib/librte_timer/rte_timer_version.map |   6 +
 5 files changed, 321 insertions(+), 136 deletions(-)
Signature · 1 line
2.6.4