s390/qdio: optimize state inspection of HW-owned SBALs
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 26 Apr 2019 07:37:41 +0000 (09:37 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 8 May 2019 13:01:23 +0000 (15:01 +0200)
commita698e1372800b7e5dde2e461c1d3948c2e06032a
tree2570ab3dd23f29f1f61a774ac7eb04e17b3aa528
parent5a19d67027283c77f51b971485c3e579d94b5a2f
s390/qdio: optimize state inspection of HW-owned SBALs

When get_buf_states() gets called with count > 1, it scans the
corresponding number of SBAL states until it encounters a mismatch.

But when these SBALs are in a HW-owned state, the callers don't actually
care _how many_ such SBALs are on the queue. If we can't process the
first SBAL, we can't process any of the following SBALs either. So when
the first SBAL is HW-owned, skip the scan of the remaining SBALs and
thus save some CPU time.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c