Re: [dpdk-dev] [PATCH v3 2/3] malloc: allow reserving biggest element

2018-05-14 Thread Burakov, Anatoly
On 10-May-18 2:57 PM, Remy Horton wrote: On 03/05/2018 18:18, Anatoly Burakov wrote: [..] Signed-off-by: Anatoly Burakov [..] +    for (idx = 0; idx < RTE_HEAP_NUM_FREELISTS; idx++) { +    for (elem = LIST_FIRST(&heap->free_head[idx]); +    !!elem; elem = LIST_NEXT(elem, fre

Re: [dpdk-dev] [PATCH v3 2/3] malloc: allow reserving biggest element

2018-05-10 Thread Remy Horton
On 03/05/2018 18:18, Anatoly Burakov wrote: [..] Signed-off-by: Anatoly Burakov [..] + for (idx = 0; idx < RTE_HEAP_NUM_FREELISTS; idx++) { + for (elem = LIST_FIRST(&heap->free_head[idx]); + !!elem; elem = LIST_NEXT(elem, free_list)) { Why

[dpdk-dev] [PATCH v3 2/3] malloc: allow reserving biggest element

2018-05-03 Thread Anatoly Burakov
Add an internal-only function to allocate biggest element from the heap. Nominally, it supports SOCKET_ID_ANY as its socket argument, but it's essentially useless because other sockets will only be allocated from if the entire heap on current or specified socket is busy. Still, asking to reserve a