[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <41302742-921f-44c3-819d-8ad044a7f206@163.com>
Date: Sun, 8 Jun 2025 11:00:05 +0800
From: Chi Zhiling <chizhiling@....com>
To: Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>
Cc: willy@...radead.org, josef@...icpanda.com, linux-fsdevel@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Chi Zhiling <chizhiling@...inos.cn>
Subject: Re: [PATCH] readahead: fix return value of page_cache_next_miss()
when no hole is found
On 2025/6/6 18:54, Jan Kara wrote:
> On Thu 05-06-25 14:51:52, Andrew Morton wrote:
>> On Thu, 5 Jun 2025 10:22:23 +0200 Jan Kara <jack@...e.cz> wrote:
>>
>>> On Thu 05-06-25 13:49:35, Chi Zhiling wrote:
>>>> From: Chi Zhiling <chizhiling@...inos.cn>
>>>>
>>>> max_scan in page_cache_next_miss always decreases to zero when no hole
>>>> is found, causing the return value to be index + 0.
>>>>
>>>> Fix this by preserving the max_scan value throughout the loop.
>>>>
>>>> Fixes: 901a269ff3d5 ("filemap: fix page_cache_next_miss() when no hole found")
>>>> Signed-off-by: Chi Zhiling <chizhiling@...inos.cn>
>>>
>>> Indeed. Thanks for catching this. Don't know how I missed that. Feel free
>>> to add:
>>>
>>> Reviewed-by: Jan Kara <jack@...e.cz>
Thanks
>>>
>>
>> Thanks. It's a simple patch - do we expect it to have significant
>> runtime effects?
>
> I'm not sure if Chi Zhiling observed some practical effects. From what I
> know and have seen in the past, wrong responses from page_cache_next_miss()
> can lead to readahead window reduction and thus reduced read speeds.
>
> Honza
TBH, in my simple sequential reading test, I did not see any significant
speed improvement.
Powered by blists - more mailing lists