Whamcloud - gitweb
LU-9728 osd: use GFP_HIGHUSER for non-local IO 08/27908/3
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 30 Jun 2017 20:37:07 +0000 (14:37 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 29 Jul 2017 00:02:29 +0000 (00:02 +0000)
commitb0ab95d6133e783acacc6329c025d17fb282775e
tree4cc7f3895e697073a6fdd0376dc2f4434e37d51a
parent33033c27aae361069877d56d44714097a208aa76
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.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I2806c9c5c2fe269669eafdafaf2310924c3ebbe5
Reviewed-on: https://review.whamcloud.com/27908
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@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