]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit01ddce617191157b1df39a3ea1cc4bf2e1654838
treea3bd3f35c39b69b590444c3c8044a6d5403c7b83
parentf84d0d1dc8c224187faaa4d087bd6c75076507b3
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