Reason opt.lg_dirty_mult is not writable?

D'Alessandro, Luke K ldalessa at indiana.edu
Wed Jan 21 11:17:49 PST 2015


I have an application where we use jemalloc to manage network-registered memory, and we have to make sure that it doesn’t madvise() chunks to the OS or we end up with rDMA failures.

I can disable madvise() globally with the opt.lg_dirty_mult option using the environment, but that isn’t ideal since there’s no reason that the normal allocator (a separate instance of jemalloc in our case). I have been declaring an extern version of the jemalloc opt variable (prefix_je_opt_lg_dirty_mult in our case), but this means I have to link to the .a directly, rather than linking to the dynamic library or the static library through -ljemalloc_suffix.

At the same time, this appears to actually work fine.

Until per-chunk-allocator control comes online for this, would it be reasonable to make this option R/W in jemalloc? Is there some corner case that I’m missing that would make this not work?

Thanks,
Luke


More information about the jemalloc-discuss mailing list