From: Nick Piggin <nickpiggin@yahoo.com.au>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, Johannes Weiner <hannes@saeurebad.de>
Subject: Re: mm-more-likely-reclaim-madv_sequential-mappings.patch
Date: Fri, 17 Oct 2008 16:56:09 +1100 [thread overview]
Message-ID: <200810171656.09935.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20081017143307.FAA9.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Friday 17 October 2008 16:37, KOSAKI Motohiro wrote:
> Hi Nick,
>
> I don't have any opinion against this patch is good or wrong.
> but I have a question.
>
> > Really, filemap_fault should not mark the page as accessed,
> > zap_pte_range should mark the page has accessed rather than just
> > set referenced, and this patch should not clear referenced.
>
> IIRC, sequential mapping pages are usually touched twice.
> 1. page fault (caused by readahead)
> 2. memcpy in userland
>
> So, if we only drop accessed bit of the page at page fault, the page end up
> having accessed bit by memcpy.
>
> pointless?
Well, the pte will get the accessed bit set by the set_pte call. This
would probably not be set again by the memcpy (unless it was attempted
to be reclaimed in the meantime, but that should be fairly rare).
And the sequential mapping special case ignores the pte bits, so that's
OK.
The problem is that the page fault path also does a mark_page_accessed,
which sets the page's PG_dirty bit. Now this bit is mainly used by the
unmapped pagecache access / reclaim heuristics, but because we set it
here, then the sequential mapping case is forced to clear it. I think it
would be much cleaner not to set the bit in the fault handler to begin
with.
I would like to ask this sequential mapping patch is held off until then,
and I will send a patch to make the mark_page_accessed, after the dust
settles from Andrew's merge. (because I can't make such a change inside
the merge window)
--
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-10-17 5:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 23:22 mm-more-likely-reclaim-madv_sequential-mappings.patch Andrew Morton
2008-10-16 1:30 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 6:01 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 6:06 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Andrew Morton
2008-10-16 6:22 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 6:31 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Andrew Morton
2008-10-16 6:38 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 8:07 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 6:09 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-16 13:43 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
2008-10-16 17:04 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Rik van Riel
2008-10-17 2:21 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
2008-10-17 5:37 ` mm-more-likely-reclaim-madv_sequential-mappings.patch KOSAKI Motohiro
2008-10-17 5:56 ` Nick Piggin [this message]
2008-10-17 16:51 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Johannes Weiner
2008-10-18 1:30 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
2008-10-18 10:45 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Johannes Weiner
2008-10-19 2:21 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
2008-10-19 2:43 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Rik van Riel
2008-10-19 2:58 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
2008-10-19 14:39 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Johannes Weiner
2008-10-21 1:45 ` mm-more-likely-reclaim-madv_sequential-mappings.patch Nick Piggin
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=200810171656.09935.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=hannes@saeurebad.de \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/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