mm/page_owner.c: reduce page_owner structure size
Subsystems (2)
[email protected]
maintainerPATCH 53/131 mm/page_owner.c: reduce page_owner structure size
From: Ayush Mittal <[email protected]>
Subject: mm/page_owner.c: reduce page_owner structure size
Maximum page order can be at max 10 which can be accomodated in short data type(2 bytes). last_migrate_reason is defined as enum type whose values can be accomodated in short data type (2 bytes).
Total structure size is currently 16 bytes but after changing structure size it goes to 12 bytes.
Vlastimil said:
: Looks like it works, so why not.
: Before:
: [ 0.001000] allocated 50331648 bytes of page_ext
: After:
: [ 0.001000] allocated 41943040 bytes of page_ext
Signed-off-by Ayush Mittal <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Cc Vinayak Menon <[email protected]>
Cc Amit Sahrawat <[email protected]>
Cc Vaneet Narang <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/page_owner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
mm/page_owner.c renamed from mm/page_owner.c~mm-reducing-page_owner-structure-size +2 -2
@@ -20,9 +20,9 @@#define PAGE_OWNER_STACK_DEPTH (16)struct page_owner { -unsigned int order; +unsigned short order; +short last_migrate_reason;gfp_t gfp_mask; -int last_migrate_reason;depot_stack_handle_t handle; };
_