We currently fill all of RX ring, then add_buf
returns ENOSPC, which gets mis-detected as an out of
memory condition and causes us to reschedule the work,
and so on forever. Fix this by oom = err == -ENOMEM;
virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.
Make the error message clearer as well: error here does not
indicate queue full.
Did you test with either or both of them?
I was informed that an SRU would not be done unless the patch was in the upstream kernel.
This patch was posted via E-mail on June 3, 2010 kerneltrap. org/mailarchive /linux- netdev/ 2010/6/ 4/6278660
* [PATCH] KVM: add schedule check to napi_enable call
- http://
and it never made it into the upstream kernel.
Shortly after that these two were added to the upstream kernel:
http:// kerneltrap. org/mailarchive /linux- netdev/ 2010/7/ 3/6280482 1c861ee3454d47b 466c877e43
commit 1788f49548860fa
Author: Michael S. Tsirkin
Date: Fri Jul 2 16:32:55 2010 +0000
virtio_net: do not reschedule rx refill forever
We currently fill all of RX ring, then add_buf
returns ENOSPC, which gets mis-detected as an out of
memory condition and causes us to reschedule the work,
and so on forever. Fix this by oom = err == -ENOMEM;
http:// kerneltrap. org/mailarchive /git-commits- head/2010/ 7/8/42134 b1cf3e5a8ac7441 9409d1abbf
commit 58eba97d0774c69
Author: Rusty Russell
Date: Fri Jul 2 16:34:01 2010 +0000
virtio_net: fix oom handling on tx
virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.
Make the error message clearer as well: error here does not
indicate queue full.
Did you test with either or both of them?
I was informed that an SRU would not be done unless the patch was in the upstream kernel.