search for: mrg_buf_ctx

Displaying 11 results from an estimated 11 matches for "mrg_buf_ctx".

2014 Jan 08
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...e; > +}; > + > /* Internal representation of a receive virtqueue */ > struct receive_queue { > /* Virtqueue associated with this receive_queue */ > struct virtqueue *vq; > > + /* Circular buffer of mergeable rxbuf contexts. */ > + struct mergeable_receive_buf_ctx *mrg_buf_ctx; > + > + /* Number of elements & head index of mrg_buf_ctx. Size must be > + * equal to the associated virtqueue's vring size. > + */ > + unsigned int mrg_buf_ctx_size, mrg_buf_ctx_head; > + > struct napi_struct napi; > > /* Number of input buffers, and ma...
2014 Jan 08
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...e; > +}; > + > /* Internal representation of a receive virtqueue */ > struct receive_queue { > /* Virtqueue associated with this receive_queue */ > struct virtqueue *vq; > > + /* Circular buffer of mergeable rxbuf contexts. */ > + struct mergeable_receive_buf_ctx *mrg_buf_ctx; > + > + /* Number of elements & head index of mrg_buf_ctx. Size must be > + * equal to the associated virtqueue's vring size. > + */ > + unsigned int mrg_buf_ctx_size, mrg_buf_ctx_head; > + > struct napi_struct napi; > > /* Number of input buffers, and ma...
2014 Jan 07
0
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...l fragmentation. + */ + unsigned int truesize; +}; + /* Internal representation of a receive virtqueue */ struct receive_queue { /* Virtqueue associated with this receive_queue */ struct virtqueue *vq; + /* Circular buffer of mergeable rxbuf contexts. */ + struct mergeable_receive_buf_ctx *mrg_buf_ctx; + + /* Number of elements & head index of mrg_buf_ctx. Size must be + * equal to the associated virtqueue's vring size. + */ + unsigned int mrg_buf_ctx_size, mrg_buf_ctx_head; + struct napi_struct napi; /* Number of input buffers, and max we've ever had. */ @@ -78,6 +102,9 @@ s...
2014 Jan 09
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...> +}; > + > /* Internal representation of a receive virtqueue */ > struct receive_queue { > /* Virtqueue associated with this receive_queue */ > struct virtqueue *vq; > > + /* Circular buffer of mergeable rxbuf contexts. */ > + struct mergeable_receive_buf_ctx *mrg_buf_ctx; > + > + /* Number of elements & head index of mrg_buf_ctx. Size must be > + * equal to the associated virtqueue's vring size. > + */ > + unsigned int mrg_buf_ctx_size, mrg_buf_ctx_head; > + > struct napi_struct napi; > > /* Number of input buffers, and ma...
2014 Jan 09
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...> +}; > + > /* Internal representation of a receive virtqueue */ > struct receive_queue { > /* Virtqueue associated with this receive_queue */ > struct virtqueue *vq; > > + /* Circular buffer of mergeable rxbuf contexts. */ > + struct mergeable_receive_buf_ctx *mrg_buf_ctx; > + > + /* Number of elements & head index of mrg_buf_ctx. Size must be > + * equal to the associated virtqueue's vring size. > + */ > + unsigned int mrg_buf_ctx_size, mrg_buf_ctx_head; > + > struct napi_struct napi; > > /* Number of input buffers, and ma...
2014 Jan 08
0
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...X ring is full. */ >> + if (unlikely(!rq->vq->num_free)) >> + return true; > I haven't figured out why this is needed. It seems safe for > virtqueue_add_inbuf() just fail in add_recv_xx()? I think this is safe with one caveat -- we can't modify rq->mrg_buf_ctx until we know the ring isn't full (otherwise, we clobber an in-use entry). It is safe to modify rq->mrg_buf_ctx after we know that virtqueue_add_inbuf has succeeded. I can remove the rq_num_free check from try_fill_recv, and then modify virtqueue_add_inbuf to use a local mergeable_receive_b...
2014 Jan 07
10
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
skb_page_frag_refill currently permits only order-0 page allocs unless GFP_WAIT is used. Change skb_page_frag_refill to attempt higher-order page allocations whether or not GFP_WAIT is used. If memory cannot be allocated, the allocator will fall back to successively smaller page allocs (down to order-0 page allocs). This change brings skb_page_frag_refill in line with the existing page allocation
2014 Jan 07
10
[PATCH net-next v2 1/4] net: allow > 0 order atomic page alloc in skb_page_frag_refill
skb_page_frag_refill currently permits only order-0 page allocs unless GFP_WAIT is used. Change skb_page_frag_refill to attempt higher-order page allocations whether or not GFP_WAIT is used. If memory cannot be allocated, the allocator will fall back to successively smaller page allocs (down to order-0 page allocs). This change brings skb_page_frag_refill in line with the existing page allocation
2014 Jan 08
1
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...t; + if (unlikely(!rq->vq->num_free)) > >> + return true; > > I haven't figured out why this is needed. It seems safe for > > virtqueue_add_inbuf() just fail in add_recv_xx()? > I think this is safe with one caveat -- we can't modify > rq->mrg_buf_ctx until we know the ring isn't full (otherwise, we > clobber an in-use entry). It is safe to modify rq->mrg_buf_ctx > after we know that virtqueue_add_inbuf has succeeded. > > I can remove the rq_num_free check from try_fill_recv, and then > modify virtqueue_add_inbuf to use a...
2014 Jan 08
1
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...t; + if (unlikely(!rq->vq->num_free)) > >> + return true; > > I haven't figured out why this is needed. It seems safe for > > virtqueue_add_inbuf() just fail in add_recv_xx()? > I think this is safe with one caveat -- we can't modify > rq->mrg_buf_ctx until we know the ring isn't full (otherwise, we > clobber an in-use entry). It is safe to modify rq->mrg_buf_ctx > after we know that virtqueue_add_inbuf has succeeded. > > I can remove the rq_num_free check from try_fill_recv, and then > modify virtqueue_add_inbuf to use a...
2014 Jan 09
0
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...at. We could allocate an SKB per packet buffer, but if we have multi-buffer packets often(e.g., netperf benefiting from GSO/GRO), we would be allocating 1 SKB per packet buffer instead of 1 SKB per MAX_SKB_FRAGS buffers. How do you feel about any of the below alternatives: (1) Modify the existing mrg_buf_ctx to chain together free entries We can use the 'buf' pointer in mergeable_receive_buf_ctx to chain together free entries so that we can support OOO completions. This would be similar to how virtio-queue manages free sg entries. (2) Combine the buffer pointer and truesize into a single void*...