lkml.org 
[lkml]   [2024]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 04/11] readahead: rework loop in page_cache_ra_unbounded()
On Wed, Mar 13, 2024 at 06:02:46PM +0100, Pankaj Raghav (Samsung) wrote:
> @@ -239,8 +239,8 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
> * not worth getting one just for that.
> */
> read_pages(ractl);
> - ractl->_index++;
> - i = ractl->_index + ractl->_nr_pages - index - 1;
> + ractl->_index += folio_nr_pages(folio);
> + i = ractl->_index + ractl->_nr_pages - index;
> continue;
> }
>
> @@ -252,13 +252,14 @@ void page_cache_ra_unbounded(struct readahead_control *ractl,
> folio_put(folio);
> read_pages(ractl);
> ractl->_index++;
> - i = ractl->_index + ractl->_nr_pages - index - 1;
> + i = ractl->_index + ractl->_nr_pages - index;
> continue;
> }

You changed index++ in the first hunk, but not the second hunk. Is that
intentional?

\
 
 \ /
  Last update: 2024-05-27 16:07    [W:0.251 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site