Hi, Damjan,
       My concern is even the cache for transmit thread is full, then buffer 
will be return to the main pool, but the buffer in transmit thread cache will 
not be freed or allocated any more. So it will be deposit in the transmit 
thread cache.

BR/Lollita Liu

From: Damjan Marion (damarion) <damar...@cisco.com>
Sent: Friday, March 15, 2019 7:06 PM
To: Lollita Liu <lollita....@ericsson.com>
Cc: vpp-dev@lists.fd.io
Subject: Re: possible buffer deposit if allocating buffer via CPU on one NUMA 
and freeing buffer via CPU on another NUMA


--
Damjan


On 15 Mar 2019, at 11:42, Lollita Liu 
<lollita....@ericsson.com<mailto:lollita....@ericsson.com>> wrote:

Hi, Damjan.
       After reading the buffer management mechanism of master’s latest code, I 
think there is possibility that some buffers can’t be used anymore.
       Let me an example to explain the special case:
       The VPP is running on a server with 2 socket, CPU 0/2 in socket 1 and 
CPU 1/3 in socket 2. Worker 0 on CPU 0 will receive packet from an interface, 
say memif, then handoff packet to worker 1/2/3 on CPU 1/2/3 for further 
processing. Finally worker 1/2/3 will send the packet out and free buffers.
       Looks the buffers will be allocated from buffer_pool default_numa_0, and 
firstly freed to default_num_0->threads[1/2/3]-> cached_buffers. But there is 
no one will allocated buffer from default_num_0->threads[1/3]-> cached_buffers. 
The buffers will be left on thread 1 and 2’s cached buffers then.
       I know handoff across NUMA is highly not recommended. Just want make 
sure my understanding is right and nothing in buffer management mechanism has 
ignored by me.


Hmm, nut sure I understood the question. In case of handoff buffers will be 
freed into different cache, but then at some point, if cache is full, they will 
be returned to the main pool.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#12566): https://lists.fd.io/g/vpp-dev/message/12566
Mute This Topic: https://lists.fd.io/mt/30439106/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to