Re: [RFC] Optimization for use-once pages

From: Mike Castle (
Date: Tue Jul 24 2001 - 13:15:30 EST

On Tue, Jul 24, 2001 at 02:51:03PM -0300, Rik van Riel wrote:
> Let me give you an example:
> - sequential access of a file
> - script reads the file in 80-byte segments
> (parsing some arcane data structure)
> - these segments are accessed in rapid succession
> - each 80-byte segment is accessed ONCE
> In this case, even though the data is accessed only
> once, each page is touched PAGE_SIZE/80 times, with
> one 80-byte read() each time.

Of course, such a program is poorly written anyway. That many individual
system calls! At least rewrite to use fread(). ;->

Change the example to using mmap(), and one feels less likely throttle the


     Mike Castle
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:18 EST