All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mm: reducing page_owner structure size
       [not found] <CGME20171010082637epcas5p4b5d588057b336b4056b7bd2f84d52b32@epcas5p4.samsung.com>
@ 2017-10-10  8:25   ` Ayush Mittal
  0 siblings, 0 replies; 4+ messages in thread
From: Ayush Mittal @ 2017-10-10  8:25 UTC (permalink / raw)
  To: akpm, vbabka, vinmenon, linux-mm, linux-kernel
  Cc: a.sahrawat, pankaj.m, v.narang, Ayush Mittal

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.

Signed-off-by: Ayush Mittal <ayush.m@samsung.com>
---
 mm/page_owner.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index 0fd9dcf..4ab438a 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -19,9 +19,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;
 };
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 1/1] mm: reducing page_owner structure size
@ 2017-10-10  8:25   ` Ayush Mittal
  0 siblings, 0 replies; 4+ messages in thread
From: Ayush Mittal @ 2017-10-10  8:25 UTC (permalink / raw)
  To: akpm, vbabka, vinmenon, linux-mm, linux-kernel
  Cc: a.sahrawat, pankaj.m, v.narang, Ayush Mittal

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.

Signed-off-by: Ayush Mittal <ayush.m@samsung.com>
---
 mm/page_owner.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_owner.c b/mm/page_owner.c
index 0fd9dcf..4ab438a 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -19,9 +19,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;
 };
 
-- 
1.7.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] mm: reducing page_owner structure size
  2017-10-10  8:25   ` Ayush Mittal
@ 2017-10-10  9:34     ` Vlastimil Babka
  -1 siblings, 0 replies; 4+ messages in thread
From: Vlastimil Babka @ 2017-10-10  9:34 UTC (permalink / raw)
  To: Ayush Mittal, akpm, vinmenon, linux-mm, linux-kernel
  Cc: a.sahrawat, pankaj.m, v.narang

On 10/10/2017 10:25 AM, Ayush Mittal wrote:
> 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.
> 
> Signed-off-by: Ayush Mittal <ayush.m@samsung.com>

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

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/page_owner.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 0fd9dcf..4ab438a 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -19,9 +19,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;
>  };
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] mm: reducing page_owner structure size
@ 2017-10-10  9:34     ` Vlastimil Babka
  0 siblings, 0 replies; 4+ messages in thread
From: Vlastimil Babka @ 2017-10-10  9:34 UTC (permalink / raw)
  To: Ayush Mittal, akpm, vinmenon, linux-mm, linux-kernel
  Cc: a.sahrawat, pankaj.m, v.narang

On 10/10/2017 10:25 AM, Ayush Mittal wrote:
> 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.
> 
> Signed-off-by: Ayush Mittal <ayush.m@samsung.com>

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

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/page_owner.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/page_owner.c b/mm/page_owner.c
> index 0fd9dcf..4ab438a 100644
> --- a/mm/page_owner.c
> +++ b/mm/page_owner.c
> @@ -19,9 +19,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;
>  };
>  
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-10  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20171010082637epcas5p4b5d588057b336b4056b7bd2f84d52b32@epcas5p4.samsung.com>
2017-10-10  8:25 ` [PATCH 1/1] mm: reducing page_owner structure size Ayush Mittal
2017-10-10  8:25   ` Ayush Mittal
2017-10-10  9:34   ` Vlastimil Babka
2017-10-10  9:34     ` Vlastimil Babka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.