diff options
author | Neil Horman <nhorman@tuxdriver.com> | 2010-12-06 09:05:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-09 20:33:46 -0800 |
commit | fb4fa76a1fa59340154c42d998d700e1f8bf21e0 (patch) | |
tree | c9d66f1bd9468708ad5a241aa818c075f93f071f /net | |
parent | 4e085e76cbe558b79b54cbab772f61185879bc64 (diff) | |
download | blackbird-op-linux-fb4fa76a1fa59340154c42d998d700e1f8bf21e0.tar.gz blackbird-op-linux-fb4fa76a1fa59340154c42d998d700e1f8bf21e0.zip |
net: Convert netpoll blocking api in bonding driver to be a counter
A while back I made some changes to enable netpoll in the bonding driver. Among
them was a per-cpu flag that indicated we were in a path that held locks which
could cause the netpoll path to block in during tx, and as such the tx path
should queue the frame for later use. This appears to have given rise to a
regression. If one of those paths on which we hold the per-cpu flag yields the
cpu, its possible for us to come back on a different cpu, leading to us clearing
a different flag than we set. This results in odd netpoll drops, and BUG
backtraces appearing in the log, as we check to make sure that we only clear set
bits, and only set clear bits. I had though briefly about changing the
offending paths so that they wouldn't sleep, but looking at my origional work
more closely, it doesn't appear that a per-cpu flag is warranted. We alrady
gate the checking of this flag on IFF_IN_NETPOLL, so we don't hit this in the
normal tx case anyway. And practically speaking, the normal use case for
netpoll is to only have one client anyway, so we're not going to erroneously
queue netpoll frames when its actually safe to do so. As such, lets just
convert that per-cpu flag to an atomic counter. It fixes the rescheduling bugs,
is equivalent from a performance perspective and actually eliminates some code
in the process.
Tested by the reporter and myself, successfully
Reported-by: Liang Zheng <lzheng@redhat.com>
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: David S. Miller <davem@davemloft.net>
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions