Whamcloud - gitweb
LU-4931 ladvise: Add feature of giving file access advices 29/10029/52
authorLi Xi <lixi@ddn.com>
Tue, 22 Mar 2016 00:12:55 +0000 (08:12 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 Apr 2016 20:51:32 +0000 (20:51 +0000)
commite14246641c04c9e3004043f58f469532223d06d6
tree32c4b8781357ddf8a5987eadbc12f3544c5d0e58
parent9c710162e5acebd860f1d3f0e1bf204ac1ba98c1
LU-4931 ladvise: Add feature of giving file access advices

The fadvise() system call provided by Linux kernel enables
applications to give advices or hints about how a file will be
accessed. However, It is only a client side mechanism which is
not enough for distributed file systems like Lustre, because in
order to tune system-wide cache or read-ahead policies, servers
need to understand the advices too.

This patch adds a new feature named ladvise which provides new
APIs and utils to give advices about the access pattern of Lustre
files with the purpose of performance improvement. It is similar
to Linux fadvise() system call, except it forwards the advices
directly from Lustre client to server. The server side codes will
apply appropriate read-ahead and caching techniques for the
corresponding files.

A typical workload for ladvise is e.g. a bunch of different
clients are doing small random reads of a file, so prefetching
pages into OSS cache with big linear reads before the random IO
is a net benefit. Fetching all that data into each client cache
with fadvise() may not be, due to much more data being sent to
the client.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I6de14ed87199949963360d393897ff79826c9819
Reviewed-on: http://review.whamcloud.com/10029
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
35 files changed:
lustre/contrib/wireshark/packet-lustre.c
lustre/doc/Makefile.am
lustre/doc/lfs-ladvise.1 [new file with mode: 0644]
lustre/doc/llapi_ladvise.3 [new file with mode: 0644]
lustre/include/cl_object.h
lustre/include/dt_object.h
lustre/include/lustre/lustre_idl.h
lustre/include/lustre/lustre_user.h
lustre/include/lustre/lustreapi.h
lustre/include/lustre_req_layout.h
lustre/include/lustre_swab.h
lustre/include/obd_support.h
lustre/llite/file.c
lustre/llite/vvp_io.c
lustre/lov/lov_io.c
lustre/obdclass/cl_io.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_cl_internal.h
lustre/osc/osc_dev.c
lustre/osc/osc_internal.h
lustre/osc/osc_io.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_io.c
lustre/ptlrpc/layout.c
lustre/ptlrpc/lproc_ptlrpc.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/wiretest.c
lustre/utils/Makefile.am
lustre/utils/lfs.c
lustre/utils/liblustreapi_ladvise.c [new file with mode: 0644]
lustre/utils/lustreapi_internal.h
lustre/utils/req-layout.c
lustre/utils/wirecheck.c
lustre/utils/wiretest.c