lkml.org 
[lkml]   [2023]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V6 2/2] mm: shmem: implement POSIX_FADV_[WILL|DONT]NEED for shmem
From
Thanks Matthew!!

On 2/6/2023 9:48 PM, Matthew Wilcox wrote:
>> +static int shmem_fadvise_willneed(struct address_space *mapping,
>> + pgoff_t start, pgoff_t long end)
>> +{
>> + struct page *page;
>> + pgoff_t index;
>> +
>> + xa_for_each_range(&mapping->i_pages, index, page, start, end) {
>> + if (!xa_is_value(page))
>> + continue;
>> + page = shmem_read_mapping_page(mapping, index);
>> + if (!IS_ERR(page))
>> + put_page(page);
>> + }
>> +
>> + return 0;
>> +}
> Hm, that's a gap in the shmem folio API. Patches imminent.
I will change this piece of code to folios based on your recent set of
patches. Will wait for more reviews before update.

Thanks,
Charan

\
 
 \ /
  Last update: 2023-03-27 00:12    [W:0.743 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site