Questions about folio allocation.

From: Guo Xuenan
Date: Sun Apr 24 2022 - 07:17:46 EST

Hi Matthew,

You have done a lot of work on folio, many folio related patches have been
incorporated into the mainline. I'm very interested in your excellent work
and did some sequential read test (using fixed read length, testing on a
10G file), and found something.
1. different read length may effect folio order
using 100KB read length during sequentital read, when readahead folio
order may always 0, so there always allocate folios with 0 or 2.
2. folio order can not reach MAX_PAGECACHE_ORDER, when read length is small.
(eg, less than 32KB)

As you have mentationed here[1],
"The heuristic for choosing which folio sizes will surely need some tuning"
I wonder (1) why the folio order need align with page index. is this
necessary or there are some certain restrictions?
(2) for pagecache, by using large folio, it saving loops for allocating pages,
and i also did some test on dropcache, it shows that dropcache costs less time.
there are twenty times performance improvement when drop the 10G file's cache.
so, can i concluded that pagecache should tend to use large order of folio?


Guo Xuenan