Enable the init_on_alloc=1 and init_on_free=1 Linux options
We should normally have done this when upgrading to Linux 5.3, but Kees’ blog post was not published yet back then.
#11 Updated by intrigeri 2019-12-28 15:16:52
- Subject changed from Consider enabling the init_on_alloc=1 and init_on_free=1 Linux options to Enable the init_on_alloc=1 and init_on_free=1 Linux options
- Status changed from In Progress to Needs Validation
- Assignee deleted (
- Type of work changed from Test to Code
The 7-25% performance hit with
init_on_free=1 is not noticeable on Jenkins: recent test suite runs on this branch took about the same time as devel. I think that’s because we already have page poisoning and SLUB poisoning enabled, so the actual impact of
init_on_free=1 is much more limited than it would otherwise be, as https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6471384af2a6530696fc0203bafe4de41a23c9ef says:
> If either SLUB poisoning or page poisoning is enabled, those options take
> precedence over
init_on_free: initialization is only
> applied to unpoisoned allocations.
Jenkins test suite results are not more brittle than on the devel branch.