orangefs: implement orangefs_readahead

mm/readahead.c/read_pages was quite a bit different back
when I put my open-coded readahead logic into orangefs_readpage.
It seemed to work as designed then, it is a trainwreck now.

This patch implements orangefs_readahead using new xarray
and readahead_expand features that have just been pulled and
removes all my open-coded readahead logic.

This patch results in an extreme read performance improvement,
these sample numbers are from my test VM:

Here's an example of what's upstream in
5.11.8-200.fc33.x86_64:

30+0 records in
30+0 records out
125829120 bytes (126 MB, 120 MiB) copied, 5.77943 s, 21.8 MB/s

And here's this version of orangefs_readahead on top of
5.12.0-rc4:

30+0 records in
30+0 records out
125829120 bytes (126 MB, 120 MiB) copied, 0.325919 s, 386 MB/s

There are four xfstest regressions with this patch. David Howells
and Matthew Wilcox have been helping me work with this code. One
of the regressions has gone away with the most recent version of
their code that I'm using. I hope this patch can be
pulled even though there are still a few regressions, and that
we can try to get them resolved during the RC period.
orangefs: leave files in the page cache for a few micro seconds at least

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
1 file changed