link_elf_obj: Colour VM objects

This will cause the VM to back sufficiently large .text sections, such
as those in zfs.ko or amdgpu.ko on amd64, with superpage mappings when
possible.

Reviewed by:	alc, kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26802
This commit is contained in:
Mark Johnston 2020-10-19 16:57:59 +00:00
parent f09cbea31a
commit d80126a6f4

View File

@ -914,6 +914,9 @@ link_elf_load_file(linker_class_t cls, const char *filename,
error = ENOMEM;
goto out;
}
#if VM_NRESERVLEVEL > 0
vm_object_color(ef->object, 0);
#endif
/*
* In order to satisfy amd64's architectural requirements on the