diff options
author | Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | 2016-04-08 19:41:28 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-14 03:04:44 (GMT) |
commit | fb586f25300f4587c7ebd097a604bf269b25bfa7 (patch) | |
tree | c9cd81d9f5ddf626822d059e55f4c4691668de50 /include/net | |
parent | 250eb1f8815303f71c94a5680f8e4f2dcfa25cf5 (diff) | |
download | linux-fb586f25300f4587c7ebd097a604bf269b25bfa7.tar.xz |
sctp: delay calls to sk_data_ready() as much as possible
Currently processing of multiple chunks in a single SCTP packet leads to
multiple calls to sk_data_ready, causing multiple wake up signals which
are costy and doesn't make it wake up any faster.
With this patch it will note that the wake up is pending and will do it
before leaving the state machine interpreter, latest place possible to
do it realiably and cleanly.
Note that sk_data_ready events are not dependent on asocs, unlike waking
up writers.
v2: series re-checked
v3: use local vars to cleanup the code, suggested by Jakub Sitnicki
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sctp/structs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 1a6a626..21cb111 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h @@ -217,7 +217,8 @@ struct sctp_sock { v4mapped:1, frag_interleave:1, recvrcvinfo:1, - recvnxtinfo:1; + recvnxtinfo:1, + pending_data_ready:1; atomic_t pd_mode; /* Receive to here while partial delivery is in effect. */ |