OSDN Git Service

s390/qdio: fine-tune the queue sync
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 23 Jul 2021 08:02:17 +0000 (10:02 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 18 Aug 2021 08:01:28 +0000 (10:01 +0200)
commit87e225bfa0015aee2812246de56a09126a743192
treea3bd3f35c39b69b590444c3c8044a6d5403c7b83
parent10376b53502ef14661274c40a78cb860b54455fa
s390/qdio: fine-tune the queue sync

Push the sync check from qdio_inspect_queue() down into the two
get_*_buffer_frontier() code paths, where we actually need the sync to
look at the current queue state. This lets us avoid the check when we
know that there is no work on the queue (ie. when q->nr_buf_used is 0).

While at it introduce the qdio_sync_*_queue() helpers, so that we can
avoid the branch on q->is_input_q when we already know the queue type.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/qdio_main.c