Only allow SLAB_OBJ_EXT_IN_OBJ for unmergeable caches
Status from this message: Thanks, applied to slab/for-next and reorganized the sub-branches a bit to
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/slab: factor out slab_args_unmergeable()mm/ | +18 | 3 replies | |
| 2/2 | mm/slab: only allow SLAB_OBJ_EXT_IN_OBJ for unmergeable cachesmm/ mm/ mm/ | +4 | 5 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH V1 0/2] Only allow SLAB_OBJ_EXT_IN_OBJ for unmergeable caches
While SLAB_OBJ_EXT_IN_OBJ allows to reduce memory overhead to account slab objects, it prevents slab merging because merging can change the metadata layout.
As pointed out Vlastimil Babka, disabling merging solely for this memory optimization may not be a net win, because disabling slab merging tends to increase overall memory usage.
So let's take a conservative approach and restrict SLAB_OBJ_EXT_IN_OBJ to caches that are already unmergeable for other reasons.
Ideally this should be part of the slab/for-7.0/obj_metadata branch, but due to a conflict with slab/for-7.0/sheaves, I based it on slab/for-next (be36abd97e52).
Patch 1 factors out mergeability logic to slab_args_unmergeable(). This is used to determine mergeability before the cache is created.
Patch 2 uses the new function to allow SLAB_OBJ_EXT_IN_OBJ only when merging is not allowed for other reasons.
Harry Yoo (2):
mm/slab: factor out slab_args_unmergeable()
mm/slab: only allow SLAB_OBJ_EXT_IN_OBJ for unmergeable caches
mm/slab.h | 1 + mm/slab_common.c | 27 +++++++++++++++++---------- mm/slub.c | 3 ++- 3 files changed, 20 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0