add eal functions for thread affinity and self
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest3 patches 3 repliesIn review
- v53 patches 10 repliesSuperseded
- v43 patches 4 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 4 patches | 4 replies | Superseded | |
| v2 | 4 patches | 5 replies | Superseded | |
| v1 | 3 patches | 8 replies | Superseded |
Changes in v6 from the cover letter
* rebase for asan flag addition to app/test/meson.build
* RTE_BUILD_BUG_ON(sizeof(pthread_t) > sizeof(uintptr_t)) to raise attention if pthread_t implementation exceeds storage available from uintptr_t.
note:
the macro is placed in rte_thread_self() body because it not valid syntax at file scope of the translation unit. ordinarily the macro would be used in headers but that would leak the pthread_t implementation detail into the public header.
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | eal: add basic thread ID and current thread identifier APIlib/ lib/ lib/ +1 more | +48 | 2 replies | |
| 2/3 | eal: implement functions for get/set thread affinitylib/ lib/ lib/ +4 more | +386 | 0 replies | |
| 3/3 | test/threads: add unit test for thread APIapp/ app/ | +83 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Dmitry Kozlyuk | Konstantin Ananyev |
|---|---|---|
| 1/3 | A-b | A-b |
| 2/3 | A-b | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/3] add eal functions for thread affinity and self
this series provides basic dependencies for additional eal thread api additions. series includes
* basic platform error number conversion.
* function to get current thread identifier.
* functions to get and set affinity with platform agnostic thread identifier.
* minimal unit test of get and set affinity demonstrating usage.
note: previous series introducing these functions is now superseded by this series.
http://patches.dpdk.org/project/dpdk/list/?series=20472&state=*
v6:
* rebase for asan flag addition to app/test/meson.build
* RTE_BUILD_BUG_ON(sizeof(pthread_t) > sizeof(uintptr_t)) to raise attention if pthread_t implementation exceeds storage available from uintptr_t.
note:
the macro is placed in rte_thread_self() body because it not valid syntax at file scope of the translation unit. ordinarily the macro would be used in headers but that would leak the pthread_t implementation detail into the public header.
v5:
* use rte_log instead of log_early. it appears that logging is now initialized before the call to eal_query_group_affinity.
note: removal of log_early is off-topic for this series and
will be done separately.
* rte_log DEBUG for failure related to limitation where all processors must be in the same processor group.
* remove redundant tests. get/get/compare, set/get/compare are both retained.
v4:
* combine patch eal/windows: translate Windows errors to errno-style errors into eal: implement functions for get/set thread affinity patch. the former introduced static functions that were not used without eal: implement functions for get/set thread affinity which would cause a build break when applied standalone.
* remove struct tag from rte_thread_t struct typedef.
* remove rte_ prefix from rte_convert_cpuset_to_affinity static function.
v3:
* fix memory leak on eal_create_cpu_map error paths.
v2:
* add missing boilerplate comments warning of experimental api for rte_thread_{set,get}_affinity_by_id().
* don't break literal format string to log_early to improve searchability.
* fix multi-line comment style to match file.
* return ENOTSUP instead of EINVAL from rte_convert_cpuset_to_affinity() if cpus in set are not part of the same processor group and note limitation in commit message.
* expand series to include rte_thread_self().
* modify unit test to remove use of implementation detail and get thread identifier use added rte_thread_self().
* move literal value to rhs when using memcmp in RTE_TEST_ASSERT
Tyler Retzlaff (3):
eal: add basic thread ID and current thread identifier API
eal: implement functions for get/set thread affinity test/threads: add unit test for thread API
app/test/meson.build | 2 + app/test/test_threads.c | 81 +++++++++++++++++ lib/eal/include/rte_thread.h | 64 +++++++++++++ lib/eal/unix/rte_thread.c | 29 ++++++ lib/eal/version.map | 5 + lib/eal/windows/eal_lcore.c | 181 +++++++++++++++++++++++++++---------- lib/eal/windows/eal_windows.h | 10 ++ lib/eal/windows/include/rte_os.h | 2 + lib/eal/windows/rte_thread.c | 191 ++++++++++++++++++++++++++++++++++++++- 9 files changed, 517 insertions(+), 48 deletions(-) create mode 100644 app/test/test_threads.c
Signature · 1 line
1.8.3.1