From: Rik van Riel <riel@redhat.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC] mmaped copy too slow?
Date: Mon, 14 Jan 2008 21:15:40 -0500 [thread overview]
Message-ID: <20080114211540.284df4fb@bree.surriel.com> (raw)
In-Reply-To: <20080115100450.1180.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Tue, 15 Jan 2008 10:45:47 +0900
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> the problem is when almost page is mapped and PTE access bit on,
> page reclaim process below steps.
>
> 1) page move to inactive list -> active list
> 2) page move to active list -> inactive list
> 3) really pageout
>
> It is too roundabout and unnecessary memory pressure happend.
> if you don't mind, please discuss.
While being able to deal with used-once mappings in page reclaim
could be a good idea, this would require us to be able to determine
the difference between a page that was accessed once since it was
faulted in and a page that got accessed several times.
That kind of infrastructure could end up adding more overhead than
an immediate reclaim of these streaming mmap pages would save.
Given that page faults have overhead too, it does not surprise me
that read+write is faster than mmap+memcpy.
In threaded applications, page fault overhead will be worse still,
since the TLBs need to be synchronized between CPUs (at least at
reclaim time).
Maybe we should just advise people to use read+write, since it is
faster than mmap+memcpy?
--
All rights reversed.
--
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:[~2008-01-15 2:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 1:45 KOSAKI Motohiro
2008-01-15 2:15 ` Rik van Riel [this message]
2008-01-15 3:20 ` KOSAKI Motohiro
2008-01-15 8:57 ` Peter Zijlstra
2008-01-15 9:03 ` KOSAKI Motohiro
2008-01-15 9:08 ` Peter Zijlstra
2008-01-15 12:46 ` Paulo Marques
2008-01-16 2:05 ` KOSAKI Motohiro
2008-01-17 3:23 ` KOSAKI Motohiro
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=20080114211540.284df4fb@bree.surriel.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@jp.fujitsu.com \
--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