]> git.baikalelectronics.ru Git - kernel.git/commit
rds: Fix incorrect statistics counting
authorHåkon Bugge <Haakon.Bugge@oracle.com>
Wed, 6 Sep 2017 16:35:51 +0000 (18:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Sep 2017 03:07:13 +0000 (20:07 -0700)
commit23e48c22b4104b8f57772d93b7cdf1edc7617687
tree9eb6678bb969d67a8f6cbab6110f0816bbde0798
parenta2e2035a2f9cce3d2ce02d41703ccacd6c887377
rds: Fix incorrect statistics counting

In rds_send_xmit() there is logic to batch the sends. However, if
another thread has acquired the lock and has incremented the send_gen,
it is considered a race and we yield. The code incrementing the
s_send_lock_queue_raced statistics counter did not count this event
correctly.

This commit counts the race condition correctly.

Changes from v1:
- Removed check for *someone_on_xmit()*
- Fixed incorrect indentation

Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/send.c