Re: [PATCH 08/17] mm/filemap: add read support for RWF_UNCACHED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/15/24 1:49 AM, Kirill A. Shutemov wrote:
> On Thu, Nov 14, 2024 at 08:25:12AM -0700, Jens Axboe wrote:
>> @@ -2595,6 +2601,20 @@ static inline bool pos_same_folio(loff_t pos1, loff_t pos2, struct folio *folio)
>>  	return (pos1 >> shift == pos2 >> shift);
>>  }
>>  
>> +static void filemap_uncached_read(struct address_space *mapping,
>> +				  struct folio *folio)
>> +{
>> +	if (!folio_test_uncached(folio))
>> +		return;
>> +	if (folio_test_writeback(folio))
>> +		return;
> 
> Do we want to drop out here if the folio is dirty, but not yet under
> writeback?
> 
> It is checked inside folio_unmap_invalidate(), but we will lose
> PG_uncached if we get there.

True, seems prudent to skip if it's dirty as well, if only to avoid
losing uncached for that particular case. I'll add the tweak, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux