]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 27 Apr 2017 17:11:24 +0000 (10:11 -0700)
committerMike Snitzer <snitzer@redhat.com>
Thu, 27 Apr 2017 21:08:45 +0000 (17:08 -0400)
commitca5beb76c32af33e5be4e01c85c8bd5a067c4543
treeda891f5543130b6f7ead7bc135d1d203104471eb
parent7e0d574f2683a2346c978613a72ff07afc89b17a
dm mpath: micro-optimize the hot path relative to MPATHF_QUEUE_IF_NO_PATH

Instead of checking MPATHF_QUEUE_IF_NO_PATH,
MPATHF_SAVED_QUEUE_IF_NO_PATH and the no_flush flag to decide whether
or not to push back a request (or bio) if there are no paths available,
only clear MPATHF_QUEUE_IF_NO_PATH in queue_if_no_path() if no_flush has
not been set.  The result is that only a single bit has to be tested in
the hot path to decide whether or not a request must be pushed back and
also that m->lock does not have to be taken in the hot path.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c