Whamcloud - gitweb
LU-9728 osd: use GFP_HIGHUSER for non-local IO 18/28318/3
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 30 Jun 2017 20:37:07 +0000 (14:37 -0600)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 10 Aug 2017 16:25:56 +0000 (16:25 +0000)
commita4c7545f6e77229a3eabe537eb9ed161ff3c88ee
tree34c09f7a71275fc9600b5e5f696ac38f85ad1ec0
parent907f35db14e5b796bc4d722e16dc206d759e4a9a
LU-9728 osd: use GFP_HIGHUSER for non-local IO

When the obdfilter code was split into separate OFD and OSD modules,
the bulk IO page allocation was implemented to use GFP_NOFS to avoid
allocations recursing into the filesystem and causing deadlocks.

However, this is only possible if the RPC is coming from a local
client, as we might end up waiting on a page sent in the request we're
serving. Local RPCs use __GFP_HIGHMEM so that the pages can use all of
the available memory on the OSS on 32-bit machines.

It is possible to use more aggressive GFP_HIGHUSER flags for non-local
clients to be able to generate more memory pressure on the OSS and
allow inactive pages to be reclaimed, since the OSS doesn't have any
other processes or allocations that generate memory reclaim pressure.

See also b=17576 (bdf50dc9) and b=19529 (3dcf18d3) for details.

The patch also implements an LNet function to determine if a client NID
is local or not.  This becomes more complex in the LNet Multi-Rail world
and it is really LNet's job to handle NIDs, not that of Lustre.

Lustre-change: https://review.whamcloud.com/27908
Lustre-commit: b0ab95d6133e783acacc6329c025d17fb282775e

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2806c9c5c2fe269669eafdafaf2310924c3ebbe5
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/28318
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lnet/include/lnet/api.h
lnet/lnet/api-ni.c
lustre/include/dt_object.h
lustre/include/lustre_net.h
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_io.c
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_io.c
lustre/target/tgt_handler.c