Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463360

[PATCH v2 0/6] Reduce memory waste by page extension user

From js1304@gmail.com
Newsgroups linux.kernel
Subject [PATCH v2 0/6] Reduce memory waste by page extension user
Date 2016-08-16 05:00 +0200
Message-ID <s6CLD-5JI-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Joonsoo Kim <iamjoonsoo.kim@lge.com>

v2:
Fix rebase mistake (per Vlastimil)
Rename some variable/function to prevent confusion (per Vlastimil)
Fix header dependency (per Sergey)

This patchset tries to reduce memory waste by page extension user.

First case is architecture supported debug_pagealloc. It doesn't
requires additional memory if guard page isn't used. 8 bytes per
page will be saved in this case.

Second case is related to page owner feature. Until now, if page_ext
users want to use it's own fields on page_ext, fields should be
defined in struct page_ext by hard-coding. It has a following problem.

struct page_ext {
 #ifdef CONFIG_A
	int a;
 #endif
 #ifdef CONFIG_B
	int b;
 #endif
};

Assume that kernel is built with both CONFIG_A and CONFIG_B.
Even if we enable feature A and doesn't enable feature B at runtime,
each entry of struct page_ext takes two int rather than one int.
It's undesirable waste so this patch tries to reduce it. By this patchset,
we can save 20 bytes per page dedicated for page owner feature
in some configurations.

Thanks.

Joonsoo Kim (6):
  mm/debug_pagealloc: clean-up guard page handling code
  mm/debug_pagealloc: don't allocate page_ext if we don't use guard page
  mm/page_owner: move page_owner specific function to page_owner.c
  mm/page_ext: rename offset to index
  mm/page_ext: support extra space allocation by page_ext user
  mm/page_owner: don't define fields on struct page_ext by hard-coding

 include/linux/page_ext.h   |   8 +--
 include/linux/page_owner.h |   2 +
 mm/page_alloc.c            |  44 +++++++------
 mm/page_ext.c              |  45 +++++++++----
 mm/page_owner.c            | 156 ++++++++++++++++++++++++++++++++++++++-------
 mm/vmstat.c                |  79 -----------------------
 6 files changed, 196 insertions(+), 138 deletions(-)

-- 
1.9.1

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] Reduce memory waste by page extension user js1304@gmail.com - 2016-08-16 05:00 +0200
  [PATCH v2 2/6] mm/debug_pagealloc: don't allocate page_ext if we don't use guard page js1304@gmail.com - 2016-08-16 05:00 +0200
  [PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user js1304@gmail.com - 2016-08-16 05:00 +0200
    Re: [PATCH v2 5/6] mm/page_ext: support extra space allocation by  page_ext user Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
  [PATCH v2 4/6] mm/page_ext: rename offset to index js1304@gmail.com - 2016-08-16 05:00 +0200
    Re: [PATCH v2 4/6] mm/page_ext: rename offset to index Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
  [PATCH v2 1/6] mm/debug_pagealloc: clean-up guard page handling code js1304@gmail.com - 2016-08-16 05:00 +0200
  [PATCH v2 3/6] mm/page_owner: move page_owner specific function to page_owner.c js1304@gmail.com - 2016-08-16 05:00 +0200
  Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:00 +0200
    Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:20 +0200

csiph-web