Whamcloud - gitweb
LU-14917 llite: Switch mmap readahead logic
authorPatrick Farrell <pfarrell@whamcloud.com>
Thu, 12 Aug 2021 16:27:50 +0000 (12:27 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 17 Sep 2021 23:51:57 +0000 (23:51 +0000)
commit7a240443992933a91b57d3d282d74873db5dc616
tree37d236da33da781bff14f101048a4e52611c7253
parent204d19c3f378486ec4f01dc42a5fe769e996f7a5
LU-14917 llite: Switch mmap readahead logic

The mmap readahead logic has shown to be badly suited for
certain workloads (kdb).  Experimentation showed that for
these workloads, the standard readahead algorithm works
better.

This patch allows switching the readahead algorithm for
mmap to the 'standard' readahead algorithm.

The added tunable is:
mmap_read_ahead_logic in llite
(lctl get_param llite.*.mmap_read_ahead_logic)

It defaults to '1', which is the special mmap readahead
logic.

Setting it to 0 switches mmap readahead to use the standard
readahead logic.

This patch also fixes the existing mmap readahead test,
which was not running.

Note the results for the existing test are better with the
standard readahead logic, ie, with mmap readahead logic
disabled.  This suggests we should default to non-mmap
readahead logic.

However, the mmap readahead logic was carefully tuned for
certain workloads, and this would be a large change.  So,
this question is deferred until we can do a larger look at
readahead behavior.

NOTE:
Fixing the mmap readahead tests revealed that mmap
readahead is not working well currently.  Fixing that is
complicated and would delay landing this patch (needed for
a customer), so this patch disables the failing portion of
the tests.

Lustre-change: https://review.whamcloud.com/44526
Lustre-commit: TBD (7f6e16938f8d4e5dadd0594b7e1b8f4c70d79c68)

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I36c5a3ccfc34379d75666bb41605344a4ae70881
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44943
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_mmap.c
lustre/llite/lproc_llite.c
lustre/llite/rw.c
lustre/llite/vvp_io.c
lustre/tests/sanity.sh