linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jungseok Lee <jungseoklee85@gmail.com>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: barami97@gmail.com
Subject: [RFC PATCH 0/2] vmalloc based thread_info allocator
Date: Mon, 25 May 2015 01:00:31 +0900	[thread overview]
Message-ID: <1432483231-23061-1-git-send-email-jungseoklee85@gmail.com> (raw)

ARM64 kernel tries to get physically contiguous 16KB for thread_info
when creating a process. The allocation is sometimes failed on low
memory platforms due to memory fragmentation, not a lack of free memory.

The first approach is to improve memory compaction logic, but the work should
consider a lot of different factors and scenarios. Instead, Sungjinn Chung
suggests a vmalloc based thread_info allocator which can address the issue
by memory fragmentation without touching any internal memory management codes.

The patches implement the idea as allocating the memory from vmalloc space
instead of 1:1 mapping area. The idea is accompanied by another observation:
vmalloc space is large enough to handle allocation request on ARM64 kernel.
It is ~240GB under a combination of 39-bit VA and 4KB page.

If a 64-bit kernel with low system memory is not an unusual option on other
architectures, the idea could be expaneded into them.

All works are based on the following branch:
https://git.kernel.org/cgit/linux/kernel/git/arm64/linux.git/log/?h=for-next/core

Any feedback or comment very welcome!

Thanks in advance!

Jungseok Lee (2):
  kernel/fork.c: add a function to calculate page address from
    thread_info
  arm64: Implement vmalloc based thread_info allocator

 arch/arm64/Kconfig                   | 12 ++++++++++++
 arch/arm64/include/asm/thread_info.h |  9 +++++++++
 arch/arm64/kernel/process.c          |  7 +++++++
 kernel/fork.c                        |  7 ++++++-
 4 files changed, 34 insertions(+), 1 deletion(-)

-- 
1.9.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>

                 reply	other threads:[~2015-05-24 16:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1432483231-23061-1-git-send-email-jungseoklee85@gmail.com \
    --to=jungseoklee85@gmail.com \
    --cc=barami97@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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