From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-mm@kvack.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
npiggin@suse.de,
"hugh.dickins@tiscali.co.uk" <hugh.dickins@tiscali.co.uk>,
avi@redhat.com,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
torvalds@linux-foundation.org, aarcange@redhat.com
Subject: [PATCH 1/2] ZERO PAGE again v4.
Date: Thu, 16 Jul 2009 18:03:03 +0900 [thread overview]
Message-ID: <20090716180303.bc9c887d.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090716180134.3393acde.kamezawa.hiroyu@jp.fujitsu.com>
no changes since v3
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Kconfig for using ZERO_PAGE or not. Using ZERO_PAGE or not is depends on
- arch has pte_special() or not.
- arch allows to use ZERO_PAGE or not.
In this patch, generic-config for /mm and arch-specific config for x86
is added.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
Index: mmotm-2.6.31-Jul15/mm/Kconfig
===================================================================
--- mmotm-2.6.31-Jul15.orig/mm/Kconfig
+++ mmotm-2.6.31-Jul15/mm/Kconfig
@@ -214,6 +214,21 @@ config HAVE_MLOCKED_PAGE_BIT
config MMU_NOTIFIER
bool
+config SUPPORT_ANON_ZERO_PAGE
+ bool "Use anon zero page"
+ default y if ARCH_SUPPORT_ANON_ZERO_PAGE
+ help
+ In anonymous private mapping (MAP_ANONYMOUS and /dev/zero), a read
+ page fault will allocate a new zero-cleared page. If the first page
+ fault is write, allocating a new page is necessary. But if it is
+ read, we can use ZERO_PAGE until a write comes. If you set this to y,
+ the kernel use ZERO_PAGE and delays allocating new memory in private
+ anon mapping until the first write. If applications use large mmap
+ and most of accesses are read, this reduces memory usage and cache
+ usage to some extent. To support this, your architecture should have
+ _PAGE_SPECIAL bit in pte. And this will be no help to cpu cache if
+ the arch's cache is virtually tagged.
+
config DEFAULT_MMAP_MIN_ADDR
int "Low address space to protect from user allocation"
default 4096
Index: mmotm-2.6.31-Jul15/arch/x86/Kconfig
===================================================================
--- mmotm-2.6.31-Jul15.orig/arch/x86/Kconfig
+++ mmotm-2.6.31-Jul15/arch/x86/Kconfig
@@ -158,6 +158,9 @@ config ARCH_HIBERNATION_POSSIBLE
config ARCH_SUSPEND_POSSIBLE
def_bool y
+config ARCH_SUPPORT_ANON_ZERO_PAGE
+ def_bool y
+
config ZONE_DMA32
bool
default X86_64
--
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>
next prev parent reply other threads:[~2009-07-16 9:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 3:24 [PATCH 0/2] ZERO PAGE again v3 KAMEZAWA Hiroyuki
2009-07-09 3:27 ` [PATCH 1/2] ZERO PAGE config KAMEZAWA Hiroyuki
2009-07-09 3:28 ` [PATCH 2/2] ZERO PAGE by pte_special KAMEZAWA Hiroyuki
2009-07-09 3:58 ` Linus Torvalds
2009-07-09 4:54 ` KAMEZAWA Hiroyuki
2009-07-13 5:45 ` [PATCH 0/2] ZERO PAGE again v3 KAMEZAWA Hiroyuki
2009-07-16 9:01 ` [PATCH 0/2] ZERO PAGE again v4 KAMEZAWA Hiroyuki
2009-07-16 9:03 ` KAMEZAWA Hiroyuki [this message]
2009-07-16 9:04 ` [PATCH 2/2] ZERO PAGE based on pte_special KAMEZAWA Hiroyuki
2009-07-16 12:00 ` Minchan Kim
2009-07-16 13:02 ` KAMEZAWA Hiroyuki
2009-07-17 0:38 ` KAMEZAWA Hiroyuki
2009-07-22 23:51 ` [PATCH 0/2] ZERO PAGE again v4 KAMEZAWA Hiroyuki
2009-07-23 0:12 ` Andrew Morton
2009-07-23 0:33 ` KAMEZAWA Hiroyuki
2009-07-23 0:47 ` Andrew Morton
2009-07-26 16:00 ` Hugh Dickins
2009-07-26 22:56 ` KAMEZAWA Hiroyuki
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=20090716180303.bc9c887d.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=hugh.dickins@tiscali.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=npiggin@suse.de \
--cc=torvalds@linux-foundation.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