From: Vlastimil Babka <vbabka@suse.cz>
To: Yafang Shao <laoar.shao@gmail.com>, akpm@linux-foundation.org
Cc: 42.hyeyoo@gmail.com, willy@infradead.org, linux-mm@kvack.org
Subject: Re: [PATCH -mm 0/2] mm: page_ext: split page_ext flags
Date: Mon, 16 Jan 2023 11:58:29 +0100 [thread overview]
Message-ID: <bee84625-a31b-536f-b714-755e779d6205@suse.cz> (raw)
In-Reply-To: <20221217105833.24851-1-laoar.shao@gmail.com>
On 12/17/22 11:58, Yafang Shao wrote:
> On 64bit system, page extension is for debugging purpose only currently,
> because of its overhead, in particular the memory overhead.
>
> Once a page_ext is enabled, at least it will take 0.2% of the total
> memory because of the page_ext flags, no matter this page_ext uses it or
> not. Currently this page_ext flags is only used for page_owner on 64bit
> system. So it doesn't make sense to allocate this flags for all page_ext
> by default. We'd better move it into page_owner's structure, then when
> someone wants to introduce a new page_ext which may be memory-overhead
> sensitive, it will save this unneeded overhead.
>
> On 32bit system, there's page_idle running on production envrionment,
> which also uses this page_ext flags. So it will take another 0.2% of
> total memory if the user enable both page_idle and page_owner after this
> change, but considering page_owner is for debugging purpose only, the
> memory overhead in this case won't be a problem.
>
> So, let split the page_ext flags.
Hi,
FYI I think Pasha's solution should work to avoid the waste even without the
split:
https://lore.kernel.org/all/20230113154253.92480-1-pasha.tatashin@soleen.com/
> Yafang Shao (2):
> mm: page_owner: split page_owner's flag from the comm flags
> mm: page_idle: split 32bit page_idle's flag from the common flags
>
> include/linux/page_ext.h | 14 +-------------
> include/linux/page_idle.h | 39 +++++++++++++++++++++++++++++++++------
> mm/page_ext.c | 10 ----------
> mm/page_idle.c | 12 ++++++++++++
> mm/page_owner.c | 36 ++++++++++++++++++++++--------------
> 5 files changed, 68 insertions(+), 43 deletions(-)
>
next prev parent reply other threads:[~2023-01-16 10:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 10:58 Yafang Shao
2022-12-17 10:58 ` [PATCH -mm 1/2] mm: page_owner: split page_owner's flag from the comm flags Yafang Shao
2022-12-17 10:58 ` [PATCH -mm 2/2] mm: page_idle: split 32bit page_idle's flag from the common flags Yafang Shao
2022-12-17 12:45 ` kernel test robot
2022-12-17 13:59 ` Yafang Shao
2022-12-17 12:45 ` kernel test robot
2022-12-18 8:08 ` [PATCH -mm 0/2] mm: page_ext: split page_ext flags Hyeonggon Yoo
2022-12-18 10:01 ` Yafang Shao
2022-12-18 11:22 ` Hyeonggon Yoo
2023-01-16 10:58 ` Vlastimil Babka [this message]
2023-01-18 3:15 ` Yafang Shao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bee84625-a31b-536f-b714-755e779d6205@suse.cz \
--to=vbabka@suse.cz \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=laoar.shao@gmail.com \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox