Commit 6b4c54e3 authored by Ayush Mittal's avatar Ayush Mittal Committed by Linus Torvalds

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.
  [    0.001000] allocated 50331648 bytes of page_ext
  [    0.001000] allocated 41943040 bytes of page_ext"

Link: default avatarAyush Mittal <>
Acked-by: default avatarVlastimil Babka <>
Cc: Vinayak Menon <>
Cc: Amit Sahrawat <>
Cc: Vaneet Narang <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 5984af10
......@@ -20,9 +20,9 @@
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment