use WFE for locks and ring on aarch64
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 5 repliesIn review
- v35 patches 11 repliesSuperseded
- v2 RFC5 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 5 patches | 8 replies | Superseded |
Changes in v4 from the cover letter
- rename the config as CONFIG_RTE_ARM_USE_WFE to indicate it applys to arm only
- introduce a macro for assembly Skelton to reduce the duplication of code
- add one patch for nxp fslmc to address a compiling error
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | bus/fslmc: fix the conflicting dmb functiondrivers/ drivers/ | +8 | 0 replies | |
| 2/6 | eal: add the APIs to wait until equallib/ lib/ | +55 | 2 replies | |
| 3/6 | ticketlock: use new API to reduce contention on aarch64lib/ | +1 | 0 replies | |
| 4/6 | ring: use wfe to wait for ring tail update on aarch64lib/ lib/ | +3 | 0 replies | |
| 5/6 | spinlock: use wfe to reduce contention on aarch64lib/ | +25 | 1 reply | |
| 6/6 | config: add WFE config entry for aarch64config/ config/ | +7 | 0 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Phil Yang | Ruifeng Wang | Steve Capper | Ola Liljedahl | Honnappa Nagarahalli | Pavan Nikhilesh |
|---|---|---|---|---|---|---|
| 1/6 | R-b | |||||
| 2/6 | R-b | R-b | R-b | R-b | R-b | A-b |
| 3/6 | T-b | R-b | T-b | |||
| 4/6 | R-b | R-b | R-b | R-b | ||
| 5/6 | R-b | R-b | R-b | R-b | R-b | T-b |
| 6/6 | R-b | R-b | R-b | R-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [dpdk-dev] [PATCH v4 0/6] use WFE for locks and ring on aarch64
DPDK has multiple use cases where the core repeatedly polls a location in memory. This polling results in many cache and memory transactions.
Arm architecture provides WFE (Wait For Event) instruction, which allows the cpu core to enter a low power state until woken up by the update to the memory location being polled. Thus reducing the cache and memory transactions.
x86 has the PAUSE hint instruction to reduce such overhead.
The rte_wait_until_equal_xxx APIs abstract the functionality of 'polling for a memory location to become equal to a given value'.
For non-Arm platforms, these APIs are just wrappers around do-while loop with rte_pause, so there are no performance differences.
For Arm platforms, use of WFE can be configured using CONFIG_RTE_USE_WFE option. It is disabled by default.
Currently, use of WFE is supported only for aarch64 platforms. armv7 platforms do support the WFE instruction, but they require explicit wake up events(sev) and are less performannt.
Testing shows that, performance varies across different platforms, with some showing degradation.
CONFIG_RTE_ARM_USE_WFE should be enabled depending on the performance benchmarking on the target platforms. Power saving should be an bonus, but currenly we don't have ways to characterize that.
V4:
- rename the config as CONFIG_RTE_ARM_USE_WFE to indicate it applys to arm only
- introduce a macro for assembly Skelton to reduce the duplication of code
- add one patch for nxp fslmc to address a compiling error
V3:
- Convert RFCs to patches
V2:
- Use inline functions instead of marcos
- Add load and compare in the beginning of the APIs
- Fix some style errors in asm inline
V1:
- Add the new APIs and use it for ring and locks
Gavin Hu (6):
bus/fslmc: fix the conflicting dmb function
eal: add the APIs to wait until equal
ticketlock: use new API to reduce contention on aarch64
ring: use wfe to wait for ring tail update on aarch64
spinlock: use wfe to reduce contention on aarch64
config: add WFE config entry for aarch64
config/arm/meson.build | 1 + config/common_base | 6 +++++ drivers/bus/fslmc/mc/fsl_mc_sys.h | 10 +++++--- drivers/bus/fslmc/mc/mc_sys.c | 3 +-- .../common/include/arch/arm/rte_pause_64.h | 30 ++++++++++++++++++++++ .../common/include/arch/arm/rte_spinlock.h | 25 ++++++++++++++++++ lib/librte_eal/common/include/generic/rte_pause.h | 26 ++++++++++++++++++- .../common/include/generic/rte_ticketlock.h | 3 +-- lib/librte_ring/rte_ring_c11_mem.h | 4 +-- lib/librte_ring/rte_ring_generic.h | 3 +-- 10 files changed, 99 insertions(+), 12 deletions(-)
Signature · 1 line
2.7.4