On 07/10/2024 17:38, Jaegeuk Kim wrote:
> Hi Ryan,
> 
> On 10/02, Ryan Roberts wrote:
>> Hi Jaegeuk Kim, Chao Yu,
>>
>> I heard (via Matthew Wilcox) that you may be in the process of forming plans 
>> to
>> add large folio support to f2fs? If so, I wonder if you could let me know how
>> those plans are progressing? I saw your v6.12-rc1 pull request did a lot of
>> conversion from struct page to struct folio (of the small variety for now) 
>> but
>> wondered if this is intended as pre-work for enabling large folios?
>>
>> I've been doing a lot of work on the anonymous memory side to support large
>> folios ("mTHP") and hook that up to arm64's contpte pgtable support. This
>> improves performance nicely.
>>
>> Additionally I have experimented (on XFS) with ensuring that text mappings 
>> are
>> contpte mapped where possible and this reduces pressure in the iTLB to 
>> improve
>> performance further. But it all relies on the file system supporting large
>> folios. I'd very much like to realize these performance gains on Android, but
>> that requires the file systems that Android uses to support large folios.
>>
>> It would be great to understand your plans, if any, and figure out if/where 
>> Arm
>> may be able to help accelerate activities in this area. I'm not (yet!) an fs
>> expert, but I see that f2fs is already using iomap, so perhaps now that you 
>> are
>> supporting small folios, switching up to large folios is not too big of a 
>> step?
> 
> Thanks for sharing the background. By any chance, have you talked larg folio
> with Android kernel team? 

Android kernel team are actively working (along with partners) to enable mTHP -
that's large folios for anonymous memory. They haven't yet got to looking
specifically at large-folios for file-backed memory. But I've had some informal
conversations with a couple of Android kernel team folks which have been
positive about the prospect.

If indeed there's a fair benefit from Android side,
> I'd like to circle back supporting it in f2fs seriously.

My own experiments have demonstrated performance uplift in Chromium web browsing
when using contpte-mapped code [1] (about 1.5% improvement on its own). We also
have plans to selectively use 2M THP (that's PMD-sized for 4K pages, or
contpte-sized for 16K pages) for some hot code, which previous experiments have
shown to be beneficial (I see about 2.5% for the same speedometer benchmark).
This all relies upon the filesystem supporting large folios though.

I'd really like to get large-folio support into f2fs to enable gathering more
performance data in a real Android environment. How best can be work together to
add this feature to f2fs?

[1] 
https://lore.kernel.org/linux-mm/20240717071257.4141363-3-ryan.robe...@arm.com/

Thanks,
Ryan

> 
>>
>> Thanks,
>> Ryan



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to