From: WU Fengguang <wfg@mail.ustc.edu.cn>
To: J?rn Engel <joern@wohnheim.fh-wedel.de>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] Adaptive read-ahead v4
Date: Tue, 18 Oct 2005 10:58:06 +0800 [thread overview]
Message-ID: <20051018025806.GA3963@mail.ustc.edu.cn> (raw)
In-Reply-To: <20051017173034.GA6558@wohnheim.fh-wedel.de>
On Mon, Oct 17, 2005 at 07:30:34PM +0200, J?rn Engel wrote:
> On Sun, 16 October 2005 01:47:31 +0800, WU Fengguang wrote:
> >
> > @@ -131,6 +133,63 @@ struct page_state {
> >
> > unsigned long pgrotated; /* pages rotated to tail of the LRU */
> > unsigned long nr_bounce; /* pages for bounce buffers */
> > +
> > + unsigned long cache_miss; /* read cache misses */
> > + unsigned long readrandom; /* random reads */
> > + unsigned long pgreadrandom; /* random read pages */
> > + unsigned long readahead_rescue; /* read-aheads rescued*/
> > + unsigned long pgreadahead_rescue;
> > + unsigned long readahead_end; /* read-aheads passed EOF */
> > +
> > + unsigned long readahead; /* read-aheads issued */
> > + unsigned long readahead_return; /* look-ahead marks returned */
> > + unsigned long readahead_eof; /* read-aheads stop at EOF */
> > + unsigned long pgreadahead; /* read-ahead pages issued */
> > + unsigned long pgreadahead_hit; /* read-ahead pages accessed */
> > + unsigned long pgreadahead_eof;
> > +
> > + unsigned long ra_newfile; /* read-ahead on start of file */
> > + unsigned long ra_newfile_return;
> > + unsigned long ra_newfile_eof;
> > + unsigned long pgra_newfile;
> > + unsigned long pgra_newfile_hit;
> > + unsigned long pgra_newfile_eof;
> > +
> > + unsigned long ra_state; /* state based read-ahead */
> > + unsigned long ra_state_return;
> > + unsigned long ra_state_eof;
> > + unsigned long pgra_state;
> > + unsigned long pgra_state_hit;
> > + unsigned long pgra_state_eof;
> > +
> > + unsigned long ra_context; /* context based read-ahead */
> > + unsigned long ra_context_return;
> > + unsigned long ra_context_eof;
> > + unsigned long pgra_context;
> > + unsigned long pgra_context_hit;
> > + unsigned long pgra_context_eof;
> > +
> > + unsigned long ra_contexta; /* accelerated context based read-ahead */
> > + unsigned long ra_contexta_return;
> > + unsigned long ra_contexta_eof;
> > + unsigned long pgra_contexta;
> > + unsigned long pgra_contexta_hit;
> > + unsigned long pgra_contexta_eof;
> > +
> > + unsigned long ra_backward; /* prefetch pages for backward reading */
> > + unsigned long ra_backward_return;
> > + unsigned long ra_backward_eof;
> > + unsigned long pgra_backward;
> > + unsigned long pgra_backward_hit;
> > + unsigned long pgra_backward_eof;
> > +
> > + unsigned long ra_random; /* read-ahead on seek-and-read-pages */
> > + unsigned long ra_random_return;
> > + unsigned long ra_random_eof;
> > + unsigned long pgra_random;
> > + unsigned long pgra_random_hit;
> > + unsigned long pgra_random_eof;
> > +
> > };
>
> Without actually understanding what you're doing, wouldn't a struct
> for all those groups make sense? I bet it can simplify the actual
> code as well.
Yeah, I did not expect the structure to grow so large.
It should be better to create a stand alone struct and create a
dedicated entry in /proc/. The data would be a nice hint for
administrators who care the performance.
Thanks,
Wu Fengguang
next prev parent reply other threads:[~2005-10-18 2:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 17:47 WU Fengguang
2005-10-17 17:30 ` Jörn Engel
2005-10-18 2:58 ` WU Fengguang [this message]
2005-10-18 3:31 ` Andrew Morton
2005-10-18 11:10 ` WU Fengguang
2005-10-20 15:14 ` Ingo Oeser
2005-10-21 6:42 ` WU Fengguang
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=20051018025806.GA3963@mail.ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®