https://bugs.linaro.org/show_bug.cgi?id=1851
--- Comment #3 from Bill Fischofer <[email protected]> ---
Freeing buffers just returns them to the local cache, not the pool. ODP could
have an odp_pool_flush() API that explicitly flushed the local cache (if any)
but that seems unnecessary as odp_pool_destroy() does that as part of its
processing, and it's not clear why you'd want to flush the local cache except
as part of destroy processing.
In the proposed convention where all threads that allocated from the pool call
odp_pool_destroy() all of these calls will fail except the last one as each of
the "intermediate" calls will simply flush their local caches and then observe
that the pool is still in use. Only when the last thread calls
odp_pool_destroy() will the final local cache be flushed and all buffers will
be accounted for in the pool itself, allowing the destroy operation to
complete.
The use of caches does complicate application logic somewhat, but given their
performance benefits it seems a reasonable tradeoff. I guess the larger
question is what is the use case for casual pool destruction? Asking the ODP
implementation to maintain full coherency between all potential local pool
caches would impose non-trivial overhead and unless there's a compelling reason
for needing that functionality, it seems having the application take some
responsibility for coordinating termination processing for pools is not
unreasonable.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp