Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-10 Thread Oleg Nesterov
Ram wrote: > > On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: > > > > out: > > - return newsize; > > + return ra->prev_page + 1; > > This change introduces one key behavioural change in > page_cache_readahead(). Instead of returning the number-of-pages > successfully read, it now returns the

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-10 Thread Oleg Nesterov
Ram wrote: On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: out: - return newsize; + return ra-prev_page + 1; This change introduces one key behavioural change in page_cache_readahead(). Instead of returning the number-of-pages successfully read, it now returns the next-page-index

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Ram
On Wed, 2005-03-09 at 16:03, Steven Pratt wrote: > Ram wrote: > > >On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: > > > > > >..snip... > > > > > > > >>@@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac > >>} > >> > >> out: > >>- return newsize; > >>+ return ra->prev_page +

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Steven Pratt
Ram wrote: On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: ..snip... @@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac } out: - return newsize; + return ra->prev_page + 1; This change introduces one key behavioural change in page_cache_readahead(). Instead of returning

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Ram
On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: ..snip... > @@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac > } > > out: > - return newsize; > + return ra->prev_page + 1; This change introduces one key behavioural change in page_cache_readahead(). Instead of

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Ram
On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: ..snip... @@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac } out: - return newsize; + return ra-prev_page + 1; This change introduces one key behavioural change in page_cache_readahead(). Instead of returning

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Steven Pratt
Ram wrote: On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: ..snip... @@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac } out: - return newsize; + return ra-prev_page + 1; This change introduces one key behavioural change in page_cache_readahead(). Instead of returning

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-09 Thread Ram
On Wed, 2005-03-09 at 16:03, Steven Pratt wrote: Ram wrote: On Wed, 2005-03-02 at 11:08, Oleg Nesterov wrote: ..snip... @@ -527,7 +527,7 @@ page_cache_readahead(struct address_spac } out: - return newsize; + return ra-prev_page + 1; This change

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-02 Thread Andrew Morton
Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > ~$ time dd conv=notrunc if=/tmp/GIG of=/tmp/dummy bs=$((4096+512)) > > 2.6.11-clean:real=370.35 user=0.16 sys=14.66 > 2.6.11-patched: real=234.49 user=0.19 sys=12.41 whoa, nice. Ram, can you put this through the torture-test sometime?

[PATCH 2/2] readahead: improve sequential read detection

2005-03-02 Thread Oleg Nesterov
1. Current code can't always detect sequential reading, in case when read size is not PAGE_CACHE_SIZE aligned. If application reads the file by 4096+512 chunks, we have: 1st read: first read detected, prev_page = 2. 2nd read: offset == 2, the read is considered random.

[PATCH 2/2] readahead: improve sequential read detection

2005-03-02 Thread Oleg Nesterov
1. Current code can't always detect sequential reading, in case when read size is not PAGE_CACHE_SIZE aligned. If application reads the file by 4096+512 chunks, we have: 1st read: first read detected, prev_page = 2. 2nd read: offset == 2, the read is considered random.

Re: [PATCH 2/2] readahead: improve sequential read detection

2005-03-02 Thread Andrew Morton
Oleg Nesterov [EMAIL PROTECTED] wrote: ~$ time dd conv=notrunc if=/tmp/GIG of=/tmp/dummy bs=$((4096+512)) 2.6.11-clean:real=370.35 user=0.16 sys=14.66 2.6.11-patched: real=234.49 user=0.19 sys=12.41 whoa, nice. Ram, can you put this through the torture-test sometime?