Whamcloud - gitweb
LU-12275 sec: use memchr_inv() to check if page is zero. 59/39459/3
authorMr NeilBrown <neilb@suse.de>
Tue, 21 Jul 2020 01:09:37 +0000 (11:09 +1000)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Aug 2020 05:58:43 +0000 (05:58 +0000)
commitafee2380c105c37e440aaa9ec588cd27189bc18e
treefe4f77732aa25cda19a53ebe4e17dddc83555894
parente95eca236471cf23083ef281ef204a5920e4db9b
LU-12275 sec: use memchr_inv() to check if page is zero.

memchr_inv() is the preferred way to check if a memory region is all
zeros.  It is likely fast that memcmp() is it doesn't need to read the
ZERO_PAGE into cache, or into the CPU.  It was introduced in Linux
3.2.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I0a5c3d30d5db43a3f5ebb270ea66b9db2b200a9a
Reviewed-on: https://review.whamcloud.com/39459
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/osc/osc_request.c