Whamcloud - gitweb
LU-13212 osc: fall back to vmalloc for large RPCs
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 12 Apr 2021 18:53:07 +0000 (12:53 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 5 May 2021 03:53:05 +0000 (03:53 +0000)
commit0d687a7facd580726d902e54be57410ba4ec26aa
treed3655ea5d5425b82a13c23371e5ad34d5699d834
parent02a944e275eee9df8a3a04c86cdbe5bb066333df
LU-13212 osc: fall back to vmalloc for large RPCs

For large RPC sizes (16MB+) the page array (4096 brw_page) can
become very large (128KB+ with fscrypt) and should fall back to
vmalloc() if kmalloc() fails due to memory fragmentation.

The mdc/mdt allocations are currently limited to 1MB for readdir
RPCs, but it doesn't hurt to prepare them for larger RPCs from
clients in the future if this limit is increased.

Lustre-commit: 037a9e2cf6d5b8d6fdbcde02c1c22e22272c5c07
Lustre-change: https://review.whamcloud.com/43281

Fixes: 51b32ac2b9b8 ("LU-7990 rpc: increase bulk size")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I56805f5701d6850412664ce0681a1456b9405580
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/43460
Tested-by: jenkins <devops@whamcloud.com>
lustre/mdc/mdc_request.c
lustre/mdt/mdt_handler.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_nids.c
lustre/obdecho/echo_client.c
lustre/osc/osc_request.c