diff options
author | Mark Johnston <markj@FreeBSD.org> | 2024-10-06 13:07:31 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2024-10-06 13:13:30 +0000 |
commit | 9d52823bf1dfac237e58b5208299aaa5e2df42e9 (patch) | |
tree | aec36de44af8736eedb43ba4361aeee91ffb8c62 | |
parent | 6bd8d85579a18cf69a9b02d5852f994cb1d5a1e9 (diff) |
vm_object: Widen the flags field
Take advantage of a nearby 2-byte hole to avoid growing the struct.
This way, only the offsets of "flags" and "pg_color" change. Bump
__FreeBSD_version since some out-of-tree kernel modules may access these
fields, though I haven't found any examples so far.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35905
-rw-r--r-- | sys/sys/param.h | 2 | ||||
-rw-r--r-- | sys/vm/vm_object.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h index 3d772d551ffe..8af2f9594bc1 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500024 +#define __FreeBSD_version 1500025 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 9155d9cd6d6d..3274f59f958f 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -108,8 +108,8 @@ struct vm_object { int shadow_count; /* how many objects that this is a shadow for */ vm_memattr_t memattr; /* default memory attribute for pages */ objtype_t type; /* type of pager */ - u_short flags; /* see below */ u_short pg_color; /* (c) color of first page in obj */ + u_int flags; /* see below */ blockcount_t paging_in_progress; /* (a) Paging (in or out) so don't collapse or destroy */ blockcount_t busy; /* (a) object is busy, disallow page busy. */ int resident_page_count; /* number of resident pages */ |