lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ca5b359e-45af-445f-89b7-7ec2c3d0a161@redhat.com>
Date: Mon, 14 Jul 2025 10:04:43 +0200
From: David Hildenbrand <david@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
 Chi Zhiling <chizhiling@....com>
Cc: willy@...radead.org, linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org, Chi Zhiling <chizhiling@...inos.cn>,
 Ryan Roberts <ryan.roberts@....com>
Subject: Re: [PATCH] readahead: Use folio_nr_pages() instead of shift
 operation

On 13.07.25 00:25, Andrew Morton wrote:
> On Sat, 12 Jul 2025 10:23:32 +0800 Chi Zhiling <chizhiling@....com> wrote:
> 
>> On 2025/7/12 00:15, David Hildenbrand wrote:
>>> On 10.07.25 08:04, Chi Zhiling wrote:
>>>> From: Chi Zhiling <chizhiling@...inos.cn>
>>>>
>>>> folio_nr_pages() is faster helper function to get the number of pages
>>>> when NR_PAGES_IN_LARGE_FOLIO is enabled.
>>>>
>>>> Signed-off-by: Chi Zhiling <chizhiling@...inos.cn>
>>>> ---
>>>>    mm/readahead.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/mm/readahead.c b/mm/readahead.c
>>>> index 95a24f12d1e7..406756d34309 100644
>>>> --- a/mm/readahead.c
>>>> +++ b/mm/readahead.c
>>>> @@ -649,7 +649,7 @@ void page_cache_async_ra(struct readahead_control
>>>> *ractl,
>>>>         * Ramp up sizes, and push forward the readahead window.
>>>>         */
>>>>        expected = round_down(ra->start + ra->size - ra->async_size,
>>>> -            1UL << folio_order(folio));
>>>> +            folio_nr_pages(folio));
>>>>        if (index == expected) {
>>>>            ra->start += ra->size;
>>>>            /*
>>>
>>> This should probably get squashed in Ryans commit?
>>
>> I have no objection, it's up to Ryan.
> 
> "Ryans commit" is now c4602f9fa77f ("mm/readahead: store folio order in
> struct file_ra_state") in mm-stable.  I'd prefer not to rebase for this!

Yeah, in that case, obviously no rebase :)

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ