You are not logged in.
Noticing in trunk/config that CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y , will this be the default setting for next Arch kernel release ?
By zeroing the slab allocations, those options have a performance impact. See kernel commit
Offline
https://git.archlinux.org/svntogit/pack … c2c395f22f
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not sethence is not on. As the commit message you referenced and https://outflux.net/blog/archives/2019/ … inux-v5-3/ notes
The performance impact of the former under most workloads appears to be under 1%, if it’s measurable at all.
former being init_on_alloc.
Offline
I got it enable in trunk/config. So will it stay disable in repos/core-x86_64/config ...
What may cost in slab.c are the command line option conditions, even if staticaly built without CONFIG_INIT_ON_XXX
Such as:
if (unlikely(slab_want_init_on_alloc(flags, cachep)) && objp)
memset(objp, 0, cachep->object_size);if (unlikely(slab_want_init_on_free(cachep)))
memset(objp, 0, cachep->object_size);Offline
I got it enable in trunk/config. So will it stay disable in repos/core-x86_64/config ...
It is not in repos/core-x86_64 as there has been no new release since the change to trunk
What may cost in slab.c are the command line option conditions, even if staticaly built without CONFIG_INIT_ON_XXX
Such as:
if (unlikely(slab_want_init_on_alloc(flags, cachep)) && objp) memset(objp, 0, cachep->object_size);if (unlikely(slab_want_init_on_free(cachep))) memset(objp, 0, cachep->object_size);
You can benchmark with and without the following reverted so the functions you reference would never be called
- if (mem_flags & __GFP_ZERO)
+ if (want_init_on_alloc(mem_flags))and
+ if (want_init_on_free())
+ memset(vaddr, 0, pool->size);Offline
As of version 5.3.12, linux/repos/core-x86_64/config now has the following definitions
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not setTo save a few cycles, I would have wished those macros conditionally compile or not the memset rather than branching.
https://elixir.bootlin.com/linux/latest … ab.c#L3259
https://elixir.bootlin.com/linux/latest … ub.c#L2746
Offline
You could submit such a patch for that upstream.
How would you perform it though without removing support for the boot parameters init_on_alloc and init_on_free?
Offline