On 2025/7/21 19:36, Qu Wenruo wrote:
在 2025/7/21 19:55, Jan Kara 写道:
On Mon 21-07-25 11:14:02, Gao Xiang wrote:
Hi Barry,
On 2025/7/21 09:02, Barry Song wrote:
On Wed, Jul 16, 2025 at 8:28 AM Gao Xiang <hsiang...@linux.alibaba.com> wrote:
[...]
Given the difficulty of allocating large folios, it's always a good
idea to have order-0 as a fallback. While I agree with your point,
I have a slightly different perspective — enabling large folios for
those devices might be beneficial, but the maximum order should
remain small. I'm referring to "small" large folios.
Yeah, agreed. Having a way to limit the maximum order for those small
devices (rather than disabling it completely) would be helpful. At
least "small" large folios could still provide benefits when memory
pressure is light.
Well, in the page cache you can tune not only the minimum but also the
maximum order of a folio being allocated for each inode. Btrfs and ext4
already use this functionality. So in principle the functionality is there,
it is "just" a question of proper user interfaces or automatic logic to
tune this limit.
Honza
And enabling large folios doesn't mean all fs operations will grab an
unnecessarily large folio.
For buffered write, all those filesystem will only try to get folios as large
as necessary, not overly large.
This means if the user space program is always doing buffered IO in a
power-of-two unit (and aligned offset of course), the folio size will match the
buffer size perfectly (if we have enough memory).
So for properly aligned buffered writes, large folios won't really cause
unnecessarily large folios, meanwhile brings all the benefits.
That really depends on the user behavior & I/O pattern and
could cause unexpected spike.
Anyway, IMHO, how to limit the maximum order may be useful
for small devices if large folios is enabled. When direct
reclaim is the common case, it might be too late.
Thanks,
Gao Xiang
Although I'm not familiar enough with filemap to comment on folio read and
readahead...
Thanks,
Qu
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel