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


Groups > linux.kernel > #1463476

Re: [PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user

From Vlastimil Babka <vbabka@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user
Date 2016-08-16 09:30 +0200
Message-ID <s6GYV-8vA-1@gated-at.bofh.it> (permalink)
References <s6CLD-5JI-3@gated-at.bofh.it> <s6CLE-5JI-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/16/2016 04:51 AM, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Until now, if some page_ext users want to use it's own field on page_ext,
> it should be defined in struct page_ext by hard-coding. It has a problem
> that wastes memory in following situation.
>
> 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 result so this patch tries to fix it.
>
> To solve above problem, this patch implements to support extra space
> allocation at runtime. When need() callback returns true, it's extra
> memory requirement is summed to entry size of page_ext. Also, offset
> for each user's extra memory space is returned. With this offset,
> user can use this extra space and there is no need to define needed
> field on page_ext by hard-coding.
>
> This patch only implements an infrastructure. Following patch will use it
> for page_owner which is only user having it's own fields on page_ext.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

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

Back to linux.kernel | Previous | NextPrevious in thread | Next 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