Whamcloud - gitweb
LU-12071 osd-ldiskfs: bypass pagecache if requested 22/34422/30
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 14 Mar 2019 14:51:31 +0000 (17:51 +0300)
committerOleg Drokin <green@whamcloud.com>
Fri, 6 Dec 2019 01:04:31 +0000 (01:04 +0000)
commit3043c6f18964b0cc843b2e7866756a1d1ddd61e3
treefec090f35bcf79171e4657758d18b4e1fcefbbdd
parentae22814bccc6dfa3b72b15cef45ed7c2731d4e3e
LU-12071 osd-ldiskfs: bypass pagecache if requested

in few cases (non-rotational drive, by request, or file size)
osd-ldiskfs may want to skip caching. If so, bypass page cache
instead of later cache invalidation, as cache invalidation can
be quite expensive.

set the maximum cached read/write IO size use:
     lctl set_param osd-ldiskfs.*.readcache_max_io_mb=N
     lctl set_param osd-ldiskfs.*.writethrough_max_io_mb=N
The default maximum cached IO size is 8MiB.

ladvise() enforces IO to go in the cache and all subsquent
reads will consult with the cache.

Change-Id: I37403ced7ad9553128ba168fa36315d6aa1aaf2d
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34422
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-ldiskfs/osd_lproc.c
lustre/tests/sanity.sh