History log of /dpdk/lib/eal/common/eal_common_thread.c (Results 1 – 18 of 18)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v24.07-rc2, v24.07-rc1, v24.03, v24.03-rc4, v24.03-rc3, v24.03-rc2, v24.03-rc1
# ae67895b 08-Dec-2023 David Marchand <david.marchand@redhat.com>

lib: add more logging helpers

Add helpers for logging messages in libraries instead of calling
RTE_LOG() directly.
Those helpers take care of adding a \n: this will make the transition to
RTE_LOG_LI

lib: add more logging helpers

Add helpers for logging messages in libraries instead of calling
RTE_LOG() directly.
Those helpers take care of adding a \n: this will make the transition to
RTE_LOG_LINE trivial.

Note:
- for acl and sched libraries that still has some debug multilines
messages, a direct call to RTE_LOG is used: this will make it easier to
notice such special cases,

Signed-off-by: David Marchand <david.marchand@redhat.com>

show more ...


Revision tags: v23.11, v23.11-rc4, v23.11-rc3, v23.11-rc2
# 2a7a42a5 26-Oct-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: use stdatomic API

Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding
rte_atomic_xxx optional stdatomic API

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
A

eal: use stdatomic API

Replace the use of gcc builtin __atomic_xxx intrinsics with corresponding
rte_atomic_xxx optional stdatomic API

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>

show more ...


Revision tags: v23.11-rc1
# 57ecf148 13-Sep-2023 Thomas Monjalon <thomas@monjalon.net>

eal: remove deprecated thread functions

The deprecated functions rte_thread_setname() and rte_ctrl_thread_create()
are replaced with the new rte_thread API:

rte_thread_setname()
can be replaced wi

eal: remove deprecated thread functions

The deprecated functions rte_thread_setname() and rte_ctrl_thread_create()
are replaced with the new rte_thread API:

rte_thread_setname()
can be replaced with
rte_thread_set_name()
or rte_thread_set_prefixed_name()

rte_ctrl_thread_create()
can be replaced with
rte_thread_create_control()
or rte_thread_create_internal_control()

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>

show more ...


# ce703c47 13-Sep-2023 Thomas Monjalon <thomas@monjalon.net>

eal: force prefix for internal threads

In order to make sure all threads created in DPDK drivers and libraries
have the same prefix in their name, some wrapper functions are added
for internal use w

eal: force prefix for internal threads

In order to make sure all threads created in DPDK drivers and libraries
have the same prefix in their name, some wrapper functions are added
for internal use when creating a control thread or setting a thread name:
- rte_thread_create_internal_control
- rte_thread_set_prefixed_name

The equivalent public functions are then forbidden for internal use:
- rte_thread_create_control
- rte_thread_set_name

Note: the libraries and drivers conversion is done in next patches,
while doing other thread-related changes.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>

show more ...


# 70d19787 13-Sep-2023 Thomas Monjalon <thomas@monjalon.net>

eal: remove attributes from control thread creation

The experimental function rte_thread_create_control()
is supposed to wrap actions needed to create a control thread in DPDK.
This function should

eal: remove attributes from control thread creation

The experimental function rte_thread_create_control()
is supposed to wrap actions needed to create a control thread in DPDK.
This function should be easy to port on any OS.

As such, the thread attributes should not be customizable in this API.
The thread priority should be normal, and the affinity is on "free cores".
That's why the custom attributes parameter thread_attr is dropped.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>

show more ...


Revision tags: v23.07, v23.07-rc4, v23.07-rc3, v23.07-rc2, v23.07-rc1
# 841e87df 12-May-2023 Arnaud Fiorini <arnaud.fiorini@polymtl.ca>

eal: add tracepoints to track lcores and services

The tracepoints added are used to track lcore role and status,
as well as service mapping and service runstates. These
tracepoints are then used in

eal: add tracepoints to track lcores and services

The tracepoints added are used to track lcore role and status,
as well as service mapping and service runstates. These
tracepoints are then used in analyses in Trace Compass.

Signed-off-by: Arnaud Fiorini <arnaud.fiorini@polymtl.ca>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

show more ...


Revision tags: v23.03, v23.03-rc4, v23.03-rc3
# db77fe7d 17-Mar-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: drop some pthread API calls

Update EAL to use rte thread API where available instead of pthread
as a prerequisite to removing pthread stubs on Windows.

There is a single pthread_create still i

eal: drop some pthread API calls

Update EAL to use rte thread API where available instead of pthread
as a prerequisite to removing pthread stubs on Windows.

There is a single pthread_create still in use until
rte_ctrl_thread_create is removed.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

show more ...


# 7e7b6762 26-May-2023 Kaisen You <kaisenx.you@intel.com>

eal: enhance NUMA affinity heuristic

When a DPDK application is started on only one numa node, memory is
allocated for only one socket. When interrupt threads use memory,
memory may not be found on

eal: enhance NUMA affinity heuristic

When a DPDK application is started on only one numa node, memory is
allocated for only one socket. When interrupt threads use memory,
memory may not be found on the socket where the interrupt thread
is currently located, and memory has to be reallocated on the hugepage,
this operation will lead to performance degradation.

Fixes: 705356f0811f ("eal: simplify control thread creation")
Fixes: 770d41bf3309 ("malloc: fix allocation with unknown socket ID")

Signed-off-by: Kaisen You <kaisenx.you@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


Revision tags: v23.03-rc2
# b27c1bd8 01-Mar-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: fix another race in control thread creation

When ctrl_thread_init transitions params->ctrl_thread_status from
CTRL_THREAD_LAUNCHING the creating thread and new thread may run
concurrently leadi

eal: fix another race in control thread creation

When ctrl_thread_init transitions params->ctrl_thread_status from
CTRL_THREAD_LAUNCHING the creating thread and new thread may run
concurrently leading to unsynchronized access to params.

This permits races for both the failure and success paths after
ctrl_thread_status is stored.
* params->ret may be loaded in ctrl_thread_init failure path
* params->arg may be loaded in ctrl_thread_start or
control_thread_start when calling start_routine.

For ctrl_thread_init remove the params->ret load and just return 1 since
it is only interpreted as a indicator of success / failure of
ctrl_thread_init.

For {ctrl,control}_thread_start store param->arg in stack allocated
storage prior to calling ctrl_thread_init and use the copy when calling
start_routine.

For control_thread_start if ctrl_thread_init fails just return 0 instead
of loading params->ret, since the value returned is unused when
ctrl_thread_status is set to CTRL_THREAD_ERROR when ctrl_thread_init
fails.

Fixes: 878b7468eacb ("eal: add platform agnostic control thread API")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

show more ...


Revision tags: v23.03-rc1
# 45a685ca 15-Feb-2023 Ankur Dwivedi <adwivedi@marvell.com>

eal: drop export of internal tracepoints

The file rte_eal_trace.h contains some tracepoints which are internal to
the eal library. Those tracepoints are moved to a new file
eal_trace_internal.h. The

eal: drop export of internal tracepoints

The file rte_eal_trace.h contains some tracepoints which are internal to
the eal library. Those tracepoints are moved to a new file
eal_trace_internal.h. The internal tracepoints are removed from the
version.map file.

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>

show more ...


# 878b7468 08-Feb-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: add platform agnostic control thread API

Add rte_thread_create_control API as a replacement for
rte_ctrl_thread_create to allow deprecation of the use of platform
specific types in DPDK public

eal: add platform agnostic control thread API

Add rte_thread_create_control API as a replacement for
rte_ctrl_thread_create to allow deprecation of the use of platform
specific types in DPDK public API.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

show more ...


# 6d87be58 24-Jan-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: add platform agnostic thread set name API

Add a rte_thread_set_name that sets the name of an rte_thread_t thread.
This is a replacement for the rte_thread_setname(pthread_t, ...) which
exposes

eal: add platform agnostic thread set name API

Add a rte_thread_set_name that sets the name of an rte_thread_t thread.
This is a replacement for the rte_thread_setname(pthread_t, ...) which
exposes platform-specific details.

Introduces Windows implementation for rte_thread_set_name not previously
available on Windows.

Adapt drivers/mlx5 to use the new internal rte_thread_set_name API
instead of the soon to be deprecated rte_thread_setname API.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>

show more ...


# 8b0a1b8c 08-Dec-2022 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: stop using pthread for lcores and control threads

Replace the use of pthread_t in struct lcore_config with the EAL
rte_thread_t type.

Replace the direct use of pthread_create(), pthread_self()

eal: stop using pthread for lcores and control threads

Replace the use of pthread_t in struct lcore_config with the EAL
rte_thread_t type.

Replace the direct use of pthread_create(), pthread_self()
pthread_getaffinity_np() and pthread_setaffinity_np().

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>

show more ...


Revision tags: v22.11, v22.11-rc4, v22.11-rc3, v22.11-rc2, v22.11-rc1
# 51e6608a 05-Oct-2022 Tyler Retzlaff <roretzla@linux.microsoft.com>

eal: get/set thread attributes

Implement thread attributes for:

* thread affinity
* thread priority

Implement functions for managing thread attributes.

Priority is represented through a

eal: get/set thread attributes

Implement thread attributes for:

* thread affinity
* thread priority

Implement functions for managing thread attributes.

Priority is represented through an enum that allows for two levels:

* RTE_THREAD_PRIORITY_NORMAL
* RTE_THREAD_PRIORITY_REALTIME_CRITICAL

Affinity is described by the rte_cpuset_t type.

An rte_thread_attr_t object can be set to the default values
by calling rte_thread_attr_init().

Signed-off-by: Narcisa Vasile <navasile@linux.microsoft.com>
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>

show more ...


Revision tags: v22.07, v22.07-rc4, v22.07-rc3, v22.07-rc2, v22.07-rc1
# a95d7054 05-Apr-2022 David Marchand <david.marchand@redhat.com>

eal: factorize lcore main loop

All OS implementations provide the same main loop.
Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
between main and threads and factorize th

eal: factorize lcore main loop

All OS implementations provide the same main loop.
Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
between main and threads and factorize the rest as common code.
Thread id are now logged as string in a common format across OS.

Note:
- this change also fixes Windows EAL: worker threads cpu affinity was
incorrectly reported in log.

- libabigail flags this change as breaking ABI in clang builds:
1 function with some indirect sub-type change:

[C] 'function int rte_eal_remote_launch(int (void*)*, void*, unsigned
int)' at eal_common_launch.c:35:1 has some indirect sub-type
changes:
parameter 1 of type 'int (void*)*' changed:
in pointed to type 'function type int (void*)' at rte_launch.h:31:1:
entity changed from 'function type int (void*)' to 'typedef
lcore_function_t' at rte_launch.h:31:1
type size hasn't changed

This is being investigated on libabigail side.
For now, we don't have much choice but to waive reports on this symbol.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

show more ...


Revision tags: v22.03, v22.03-rc4, v22.03-rc3, v22.03-rc2
# 30a1de10 15-Feb-2022 Sean Morrissey <sean.morrissey@intel.com>

lib: remove unneeded header includes

These header includes have been flagged by the iwyu_tool
and removed.

Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>


Revision tags: v22.03-rc1, v21.11, v21.11-rc4, v21.11-rc3, v21.11-rc2, v21.11-rc1
# 705356f0 21-Oct-2021 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

eal: simplify control thread creation

Remove the usage of pthread barrier and replace it with
synchronization using atomic variable.
This also removes the use of reference count required to synchron

eal: simplify control thread creation

Remove the usage of pthread barrier and replace it with
synchronization using atomic variable.
This also removes the use of reference count required to synchronize
freeing the memory.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>

show more ...


Revision tags: v21.08, v21.08-rc4, v21.08-rc3, v21.08-rc2, v21.08-rc1, v21.05, v21.05-rc4, v21.05-rc3, v21.05-rc2, v21.05-rc1
# 99a2dd95 20-Apr-2021 Bruce Richardson <bruce.richardson@intel.com>

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
m

lib: remove librte_ prefix from directory names

There is no reason for the DPDK libraries to all have 'librte_' prefix on
the directory names. This prefix makes the directory names longer and also
makes it awkward to add features referring to individual libraries in the
build - should the lib names be specified with or without the prefix.
Therefore, we can just remove the library prefix and use the library's
unique name as the directory name, i.e. 'eal' rather than 'librte_eal'

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

show more ...