From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Wu Fengguang <wfg@mail.ustc.edu.cn>,
akpm@osdl.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] properly account readahead file major faults
Date: Tue, 22 Nov 2005 04:23:21 -0200 [thread overview]
Message-ID: <20051122062321.GA30413@logos.cnet> (raw)
In-Reply-To: <20051122042443.GA4588@mail.ustc.edu.cn>
Hi Wu!
On Tue, Nov 22, 2005 at 12:24:43PM +0800, Wu Fengguang wrote:
> Hi,
>
> On Mon, Nov 21, 2005 at 12:00:38PM -0200, Marcelo Tosatti wrote:
> > Hi,
> >
> > The fault accounting of filemap_dopage() is currently unable to account
> > for readahead pages as major faults.
>
> Sorry, I don't know much about the definition of major/minor page faults.
> So I googled one that explains the old behavior:
>
> --> Page Faults <--
> These come in two varieties. Minor and Major faults. A Major fault results
> when an application tries to access a memory page that has been swapped out to
> disk. The page must be swapped back in. A Minor fault results when an
> application tries to access a memory page that is still in memory, but the
> physical location of which is not immediately known. The address must be
> looked up.
Yep, just that "swapped out"/"swappin in" can be though of as "read
in/"read out".
> With the current accounting logic:
> - major faults reflect the times one has to wait for real I/O.
> - the more success read-ahead, the less major faults.
> - anyway, major+minor faults remain the same for the same benchmark.
>
> With your patch:
> - major faults are expected to remain the same with whatever read-ahead.
> - but what's the new meaning of minor faults?
With the patch minor faults are only those faults which can be serviced
by the pagecache, requiring no I/O.
Pages which hit the first time in cache due to readahead _have_ caused
IO, and as such they should be counted as major faults.
I suppose that if you want to count readahead hits it should be done
separately (which is now "sort of" available with the "majflt" field).
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Wu Fengguang <wfg@mail.ustc.edu.cn>,
akpm@osdl.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] properly account readahead file major faults
Date: Tue, 22 Nov 2005 04:23:21 -0200 [thread overview]
Message-ID: <20051122062321.GA30413@logos.cnet> (raw)
In-Reply-To: <20051122042443.GA4588@mail.ustc.edu.cn>
Hi Wu!
On Tue, Nov 22, 2005 at 12:24:43PM +0800, Wu Fengguang wrote:
> Hi,
>
> On Mon, Nov 21, 2005 at 12:00:38PM -0200, Marcelo Tosatti wrote:
> > Hi,
> >
> > The fault accounting of filemap_dopage() is currently unable to account
> > for readahead pages as major faults.
>
> Sorry, I don't know much about the definition of major/minor page faults.
> So I googled one that explains the old behavior:
>
> --> Page Faults <--
> These come in two varieties. Minor and Major faults. A Major fault results
> when an application tries to access a memory page that has been swapped out to
> disk. The page must be swapped back in. A Minor fault results when an
> application tries to access a memory page that is still in memory, but the
> physical location of which is not immediately known. The address must be
> looked up.
Yep, just that "swapped out"/"swappin in" can be though of as "read
in/"read out".
> With the current accounting logic:
> - major faults reflect the times one has to wait for real I/O.
> - the more success read-ahead, the less major faults.
> - anyway, major+minor faults remain the same for the same benchmark.
>
> With your patch:
> - major faults are expected to remain the same with whatever read-ahead.
> - but what's the new meaning of minor faults?
With the patch minor faults are only those faults which can be serviced
by the pagecache, requiring no I/O.
Pages which hit the first time in cache due to readahead _have_ caused
IO, and as such they should be counted as major faults.
I suppose that if you want to count readahead hits it should be done
separately (which is now "sort of" available with the "majflt" field).
--
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:[~2005-11-22 11:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 14:00 [PATCH] properly account readahead file major faults Marcelo Tosatti
2005-11-21 14:00 ` Marcelo Tosatti
2005-11-22 4:24 ` Wu Fengguang
2005-11-22 4:24 ` Wu Fengguang
2005-11-22 6:23 ` Marcelo Tosatti [this message]
2005-11-22 6:23 ` Marcelo Tosatti
2005-11-22 12:39 ` Wu Fengguang
2005-11-22 12:39 ` Wu Fengguang
2005-11-22 12:55 ` Hugh Dickins
2005-11-22 12:55 ` Hugh Dickins
2005-11-22 8:08 ` Marcelo Tosatti
2005-11-22 8:08 ` Marcelo Tosatti
2005-11-22 16:05 ` Charles Ballowe
2005-11-22 10:54 ` Marcelo Tosatti
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=20051122062321.GA30413@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wfg@mail.ustc.edu.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.