Skip to content
Commit a698e137 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Martin Schwidefsky
Browse files

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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: default avatarJens Remus <jremus@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 5a19d670
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment