lkml.org 
[lkml]   [1998]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: unexpected paging during large file reads in 2.1.127
From
Date

torvalds@transmeta.com (Linus Torvalds) writes:

> In article <87lnlb5d2t.fsf@atlas.CARNet.hr>,
> Zlatko Calusic <Zlatko.Calusic@CARNet.hr> wrote:
> >
> >I must agree entirely, because with small patch you can find below,
> >performance is very very good. Thanks to marking readahead pages as
> >referenced, I've been able to see exact behaviour that I wanted for a
> >long time.
>
> Ehh?
>
> Linux already marks pages referenced when it does read-ahead. Look in
> "add_to_page_cache()", which does this as a part of adding the page to
> the global page cache hash queues.

Yup, I know. I miscounted parentheses. :(

Small comment would be very nice, in order to improve readability of
the line in the case:

page->flags = (page->flags & ~((1 << PG_uptodate) | (1 << PG_error))) | (1 << PG_referenced);

Or breaking the line into two, whatever...

>
> So if this patch makes a difference, it must be for some other reason
> than marking the read-ahead page referenced.

This change, you introduced in 2.1.129, is a *big* win:

- if (test_and_clear_bit(PG_referenced, &page->flags)) {
- touch_page(page);
- break;
- }
- age_page(page);
- if (page->age)
+ if (test_and_clear_bit(PG_referenced, &page->flags))

Marking readahead pages referenced just helps in tight memory
conditions.

But, it is good anyway. We don't want to get rid of the pages we just
brought in the memory, only beacuse reader process is too slowly
processing data.

>
> I'd still be interested to know _which_ part of the patch makes such a
> big difference to you. I suspect the only part that _could_ make a
> difference is the count_max/count_min changes (which may well make a ton
> of sense, the reason why those counts were elevated at one point no
> longer exists).
>

Non existent page aging is the thing that speeds up 2.1.129 and makes
it my favorite kernel since cca 2.1.50. :)

Performance is just great. Reading from disk is cca 50% faster, and
that is NOT a joke!

Thanks!
--
Posted by Zlatko Calusic E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
Too much month at the end of the money.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.031 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site