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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]