Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
- 原始邮件 - > On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: > > > > > > - 原始邮件 - > > > On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > > > > We need decrease the rq->num after we can get a buf through > > > > virtqueue_get_buf() even if we could not

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Michael S. Tsirkin
On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: > > > - 原始邮件 - > > On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > > > We need decrease the rq->num after we can get a buf through > > > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the >

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
- 原始邮件 - > On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > > We need decrease the rq->num after we can get a buf through > > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > > refill routine won't be triggered under heavy memory stress since the

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Michael S. Tsirkin
On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > We need decrease the rq->num after we can get a buf through > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > refill routine won't be triggered under heavy memory stress since the driver > may > still think

[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
We need decrease the rq->num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the refill routine won't be triggered under heavy memory stress since the driver may still think there's enough room. This bug was introduced by commit

[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
We need decrease the rq-num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the refill routine won't be triggered under heavy memory stress since the driver may still think there's enough room. This bug was introduced by commit

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Michael S. Tsirkin
On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: We need decrease the rq-num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the refill routine won't be triggered under heavy memory stress since the driver may still think

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
- 原始邮件 - On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: We need decrease the rq-num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the refill routine won't be triggered under heavy memory stress since the driver

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Michael S. Tsirkin
On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: - 原始邮件 - On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: We need decrease the rq-num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the refill

Re: [PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure

2013-11-20 Thread Jason Wang
- 原始邮件 - On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: - 原始邮件 - On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: We need decrease the rq-num after we can get a buf through virtqueue_get_buf() even if we could not allocate frag skb.