The freelist can be used with jemalloc, but the thought/theory is that you can turn off the freelist and use jemalloc and get similar performance. This needs to be validated.
-Bryan > On Dec 11, 2018, at 3:18 PM, Walt Karas <wka...@oath.com.INVALID> wrote: > > I thought jemalloc is used as a drop-in replacement for the standard lib > heap functions / operators. So how can the freelist stuff not work with it? > > On Tue, Dec 11, 2018 at 4:48 PM Bryan Call <bc...@apache.org> wrote: > >> There is no point in cleaning up the code if the plan is to not use it and >> remove it from our codebase. Work should be done on proving that jemalloc >> is valid alternative. >> >> If jemalloc doesn’t prove to workout, then we might look at cleaning up >> the freelist. >> >> -Bryan >> >>> On Dec 10, 2018, at 5:42 PM, Walt Karas <wka...@oath.com.INVALID> wrote: >>> >>> As far as one can tell is a big limitation with code like: >>> >>> #if (defined(__i386__) || defined(__arm__) || defined(__mips__)) && >>>> (SIZEOF_VOIDP == 4) >>>> >>>> #define FREELIST_POINTER(_x) (_x).s.pointer >>>> >>>> #define FREELIST_VERSION(_x) (_x).s.version >>>> >>>> #define SET_FREELIST_POINTER_VERSION(_x, _p, _v) \ >>>> >>>> (_x).s.pointer = _p; \ >>>> >>>> (_x).s.version = _v >>>> >>>> #elif TS_HAS_128BIT_CAS >>>> >>>> #define FREELIST_POINTER(_x) (_x).s.pointer >>>> >>>> #define FREELIST_VERSION(_x) (_x).s.version >>>> >>>> #define SET_FREELIST_POINTER_VERSION(_x, _p, _v) \ >>>> >>>> (_x).s.pointer = _p; \ >>>> >>>> (_x).s.version = _v >>>> >>>> #elif defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) >>>> || defined(__aarch64__) || defined(__mips64) >>>> >>>> #define FREELIST_POINTER(_x) \ >>>> >>>> ((void *)(((((intptr_t)(_x).data) << 16) >> 16) | >>>> (((~((((intptr_t)(_x).data) << 16 >> 63) - 1)) >> 48) << 48))) // sign >>>> extend >>>> >>>> #define FREELIST_VERSION(_x) (((intptr_t)(_x).data) >> 48) >>>> >>>> #define SET_FREELIST_POINTER_VERSION(_x, _p, _v) (_x).data = >>>> ((((intptr_t)(_p)) & 0x0000FFFFFFFFFFFFULL) | (((_v)&0xFFFFULL) << 48)) >>>> >>>> #else >>>> >>>> #error "unsupported processor" >>>> >>>> #endif >>>> >>> >>> >>> >>> >>> On Mon, Dec 10, 2018 at 5:02 PM Leif Hedstrom <zw...@apache.org> wrote: >>> >>>> >>>> >>>>> On Dec 10, 2018, at 10:29 AM, SUSAN HINRICHS <shinr...@ieee.org> >> wrote: >>>>> >>>>> Based on Fei's measurements, the ATS freelists provide no benefit over >>>>> jemalloc. We are now in a position to do larger tests over our >>>> production >>>>> installs. >>>> >>>> >>>> Agreed, that was generally what I noticed too, except, I could not get >> ATS >>>> to be stable with just jemalloc. It’d eventually get unhappy, but I >> didn’t >>>> investigate further. But this is my point, lets focus the efforts on >> moving >>>> us forward, to jemalloc, and not mess around with freelist as it is, >>>> because it works fine as far as I can tell. >>>> >>>> — leif >>>> >>>> >> >>