History log of /dpdk/lib/eal/common/rte_malloc.c (Results 1 – 10 of 10)
Revision Date Author Comments
# 62ea63a6 18-Jun-2024 Stephen Hemminger <stephen@networkplumber.org>

mem: remove type argument from internal routines

The type argument is carried through malloc heap routines but
never used there. It is only used in rte_malloc for tracing.

Signed-off-by: Stephen He

mem: remove type argument from internal routines

The type argument is carried through malloc heap routines but
never used there. It is only used in rte_malloc for tracing.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

show more ...


# 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 ...


# 732ba1be 17-Oct-2023 Tyler Retzlaff <roretzla@linux.microsoft.com>

malloc: remove return from void functions

Remove return from rte_free and eal_free_no_trace both functions are
declared to have a return type of void so they shouldn't return a value.

Fixes: 52f409

malloc: remove return from void functions

Remove return from rte_free and eal_free_no_trace both functions are
declared to have a return type of void so they shouldn't return a value.

Fixes: 52f409d614a0 ("trace: add memory tracepoints")
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>

show more ...


# 3a0a3c88 04-Apr-2023 David Marchand <david.marchand@redhat.com>

malloc: rework heap destroy

The destroy helper has been reworked to zero all the heap object but
leave the lock untouched. The heap lock is then released through the
standard API.

Signed-off-by: Da

malloc: rework heap destroy

The destroy helper has been reworked to zero all the heap object but
leave the lock untouched. The heap lock is then released through the
standard API.

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

show more ...


# 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 ...


# 6277523c 27-Sep-2022 David Marchand <david.marchand@redhat.com>

malloc: remove unused function to set limit

This function was never implemented and has been deprecated for a long
time. We can remove it.

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


# 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>


# 2edd037c 03-Feb-2022 Dmitry Kozlyuk <dkozlyuk@nvidia.com>

mem: add dirty malloc element support

EAL malloc layer assumed all free elements content
is filled with zeros ("clean"), as opposed to uninitialized ("dirty").
This assumption was ensured in two way

mem: add dirty malloc element support

EAL malloc layer assumed all free elements content
is filled with zeros ("clean"), as opposed to uninitialized ("dirty").
This assumption was ensured in two ways:
1. EAL memalloc layer always returned clean memory.
2. Freed memory was cleared before returning into the heap.

Clearing the memory can be as slow as around 14 GiB/s.
To save doing so, memalloc layer is allowed to return dirty memory.
Such segments being marked with RTE_MEMSEG_FLAG_DIRTY.
The allocator tracks elements that contain dirty memory
using the new flag in the element header.
When clean memory is requested via rte_zmalloc*()
and the suitable element is dirty, it is cleared on allocation.
When memory is deallocated, the freed element is joined
with adjacent free elements, and the dirty flag is updated:

a) If the joint element contains dirty parts, it is dirty:

dirty + freed + dirty = dirty => no need to clean
freed + dirty = dirty the freed memory

Dirty parts may be large (e.g. initial allocation),
so clearing them could create unpredictable slowdown.

b) If the only dirty part of the joint element
is the freed memory, the joint element can be made clean:

clean + freed + clean = clean => freed memory
clean + freed = clean must be cleared
freed + clean = clean
freed = clean

This logic naturally reproduces the old behavior
and always applies in modes when EAL memalloc layer
returns only clean segments.

As a result, memory is either cleared on free, as before,
or it will be cleared on allocation if need be, but never twice.

Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 6cc51b12 20-Oct-2021 Zhihong Peng <zhihongx.peng@intel.com>

mem: instrument allocator for ASan

This patch adds necessary hooks in the memory allocator for ASan.

This feature is currently available in DPDK only on Linux x86_64.
If other OS/architectures want

mem: instrument allocator for ASan

This patch adds necessary hooks in the memory allocator for ASan.

This feature is currently available in DPDK only on Linux x86_64.
If other OS/architectures want to support it, ASAN_SHADOW_OFFSET must be
defined and RTE_MALLOC_ASAN must be set accordingly in meson.

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

show more ...


# 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 ...