]> git.baikalelectronics.ru Git - kernel.git/commit
strparser: Add __strp_unpause and use it in ktls.
authorDoron Roberts-Kedes <doronrk@fb.com>
Wed, 6 Jun 2018 16:33:28 +0000 (09:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jun 2018 18:07:53 +0000 (14:07 -0400)
commit846dfa8d94c1920bab12bc917e70e2181da2b0bc
treed0b3c5b6035ce9ca8ef2fbfc01964221be142441
parentd0a5f4870fc790a0143b160320f573edd0d825df
strparser: Add __strp_unpause and use it in ktls.

strp_unpause queues strp_work in order to parse any messages that
arrived while the strparser was paused. However, the process invoking
strp_unpause could eagerly parse a buffered message itself if it held
the sock lock.

__strp_unpause is an alternative to strp_pause that avoids the scheduling
overhead that results when a receiving thread unpauses the strparser
and waits for the next message to be delivered by the workqueue thread.

This patch more than doubled the IOPS achieved in a benchmark of NBD
traffic encrypted using ktls.

Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/strparser.h
net/strparser/strparser.c
net/tls/tls_sw.c