Daniel, thanks for the excellent summary of 2.4 VFS design/implementation.

I have a few questions concerning file I/O performance.

On Jul 29,  2:38pm, Daniel Phillips wrote:
> 
> Each of these functions works its magic through a 'mapping' defined by an
> address_space struct.  In OO terminology this would be a memory mapping class
> with instances denoting the mapping between a section of memory and a
> particular kind of underlying secondary storage.
> So what we have looks a lot like a generalization of a swap file - all
> (or the vast majority of) file I/O in Linux
> is now done by memory-mapping, whether you ask for it or not.  (This is good)

Sounds good. Has anyone run performance tests (eg, Bonnie) on the 2.4 file I/O
performance (ie, using ext2fs) vs. 2.2?  What were the results?

[...]
> So we use the page offset within a file plus a
> unique characteristic of the file (its mapping struct), followed by a linear
> search to find a piece of memory that has already been set up to map the
> file/offset we're interested in.

Has anyone run stats on how often there is a cache "hit" on I/O pages
previously mapped versus the need for a new mapping in a "typical"
environment?

What entity is responsible for tearing down the file<->page mapping, when
the storage is needed?  Is that bdflush's job?

> 
> I've only looked at generic_file_read in any detail so far.  In simple terms,
> its algorithm is:
> 
>   while there is more to transfer:
>     look in the hash table for a page that maps the current offset
>       if there isn't one, create one and add it to the page hash table
>     check that the page is up to date
>       if it isn't, read it in via the above-mentioned mapping function
>     copy the page (or part) to user space via a 'read actor'
>     advance by PAGE_SIZE 

In 2.4, does the 'read actor' (ie, for ext2) optimize the case where
the part of the I/O request being handled has a user-level address that
is page aligned, and the requested bytes to transfer are at least one
full page?  Ie, does it handle the 'copy' by simply remapping the I/O
page directly into the user's address space (avoiding a copy)?

Reply via email to