haproxy/include
Willy Tarreau a6982e5868 MINOR: memory: don't let __pool_get_first() pick from the cache
When building with the local cache support, we have an asymmetry in
the allocation path which is that __pool_get_first() picks from the
cache while when no cache support is used, this one directly accesses
the shared area. It looks like it was done this way only to centralize
the call to __pool_get_from_cache() but this was not a good idea as it
complicates the splitting the code.

Let's move the cache access to the upper layer so thatt __pool_get_first()
remains agnostic to the cache support.

The call tree now looks like this with the cache enabled :

    pool_get_first()
      __pool_get_from_cache() // if cache enabled
      __pool_get_first()

    pool_alloc()
      pool_alloc_dirty()
        __pool_get_from_cache() // if cache enabled
        __pool_get_first()
        __pool_refill_alloc()

    __pool_free()
      pool_free_area()

    pool_put_to_cache()
      __pool_free()
      __pool_put_to_cache()

    pool_free()
      pool_put_to_cache()

With cache disabled, the pool_free() path still differs:

    pool_free()
      __pool_free_area()
      __pool_put_to_cache()
2020-06-11 10:18:56 +02:00
..
common MINOR: memory: don't let __pool_get_first() pick from the cache 2020-06-11 10:18:56 +02:00
haproxy REORG: memory: move the OS-level allocator to haproxy/pool-os.h 2020-06-11 10:18:56 +02:00
import REORG: include: move ist.h from common/ to import/ 2020-06-11 10:18:56 +02:00
proto REORG: include: move freq_ctr to haproxy/ 2020-06-11 10:18:56 +02:00
types REORG: memory: move the pool type definitions to haproxy/pool-t.h 2020-06-11 10:18:56 +02:00