search for: ewma_read

Displaying 20 results from an estimated 46 matches for "ewma_read".

2013 Nov 13
2
[PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...d_skb->len); Hi, I looked at how ewma works, and although it is computationally efficient, and it does what it is supposed to do, initially (at the first samples) it is strongly biased towards the value that was added at the first ewma_add. I suggest that you print the values of ewma_add() and ewma_read(). If you are happy with the results, then ignore my comments. If you are not, then I can provide a version that does better for the first samples. Unfortunately, it will be slightly less efficient. Ronen. > return 0; > } > > @@ -382,16 +404,21 @@ static void receive_buf(struc...
2013 Nov 13
2
[PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...d_skb->len); Hi, I looked at how ewma works, and although it is computationally efficient, and it does what it is supposed to do, initially (at the first samples) it is strongly biased towards the value that was added at the first ewma_add. I suggest that you print the values of ewma_add() and ewma_read(). If you are happy with the results, then ignore my comments. If you are not, then I can provide a version that does better for the first samples. Unfortunately, it will be slightly less efficient. Ronen. > return 0; > } > > @@ -382,16 +404,21 @@ static void receive_buf(struc...
2014 Jan 16
0
[PATCH net-next v4 6/6] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...fp_t gfp) return err; } -static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) +static unsigned int get_mergeable_buf_len(struct ewma *avg_pkt_len) { const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int len; + + len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), + GOOD_PACKET_LEN, PAGE_SIZE - hdr_len); + return ALIGN(len, MERGEABLE_BUFFER_ALIGN); +} + +static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) +{ struct page_frag *alloc_frag = &rq->alloc_frag; char *buf; unsigned long ctx; int err; unsigned int l...
2014 Jan 16
0
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...fp_t gfp) return err; } -static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) +static unsigned int get_mergeable_buf_len(struct ewma *avg_pkt_len) { const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int len; + + len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), + GOOD_PACKET_LEN, PAGE_SIZE - hdr_len); + return ALIGN(len, MERGEABLE_BUFFER_ALIGN); +} + +static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) +{ struct page_frag *alloc_frag = &rq->alloc_frag; char *buf; unsigned long ctx; int err; unsigned int l...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) > +static unsigned int get_mergeable_buf_len(struct ewma *avg_pkt_len) > { > const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); > + unsigned int len; > + > + len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), > + GOOD_PACKET_LEN, PAGE_SIZE - hdr_len); > + return ALIGN(len, MERGEABLE_BUFFER_ALIGN); > +} > + > +static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) > +{ > struct page_frag *alloc_frag = &rq->alloc_frag; > char *buf; > u...
2014 Jan 16
2
[PATCH net-next v3 5/5] virtio-net: initial rx sysfs support, export mergeable rx buffer size
...static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) > +static unsigned int get_mergeable_buf_len(struct ewma *avg_pkt_len) > { > const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); > + unsigned int len; > + > + len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), > + GOOD_PACKET_LEN, PAGE_SIZE - hdr_len); > + return ALIGN(len, MERGEABLE_BUFFER_ALIGN); > +} > + > +static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) > +{ > struct page_frag *alloc_frag = &rq->alloc_frag; > char *buf; > u...
2014 Jan 09
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...E_BUFFER_MIN; return (void *) ((uintptr)base | (len >> MERGEABLE_BUFFER_SHIFT)); } /* Compute the packet buffer length for a receive queue. */ static u16 get_mergeable_buffer_len(struct receive_queue *rq) { u16 len = clamp_t(u16, MERGEABLE_BUFFER_MIN, ewma_read(&rq->avg_pkt_len), MERGEABLE_BUFFER_MAX); return ALIGN(len, MERGEABLE_BUFFER_ALIGN); } Best, Mike
2014 Jan 09
3
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...E_BUFFER_MIN; return (void *) ((uintptr)base | (len >> MERGEABLE_BUFFER_SHIFT)); } /* Compute the packet buffer length for a receive queue. */ static u16 get_mergeable_buffer_len(struct receive_queue *rq) { u16 len = clamp_t(u16, MERGEABLE_BUFFER_MIN, ewma_read(&rq->avg_pkt_len), MERGEABLE_BUFFER_MAX); return ALIGN(len, MERGEABLE_BUFFER_ALIGN); } Best, Mike
2014 Jan 16
13
[PATCH net-next v4 1/6] 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 16
13
[PATCH net-next v4 1/6] 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 16
6
[PATCH net-next v3 1/5] 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 16
6
[PATCH net-next v3 1/5] 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 17
7
[PATCH net-next v5 0/6] virtio-net: mergeable rx buffer size auto-tuning
The virtio-net device currently uses aligned MTU-sized mergeable receive packet buffers. Network throughput for workloads with large average packet size can be improved by posting larger receive packet buffers. However, due to SKB truesize effects, posting large (e.g, PAGE_SIZE) buffers reduces the throughput of workloads that do not benefit from GRO and have no large inbound packets. This
2014 Jan 17
7
[PATCH net-next v5 0/6] virtio-net: mergeable rx buffer size auto-tuning
The virtio-net device currently uses aligned MTU-sized mergeable receive packet buffers. Network throughput for workloads with large average packet size can be improved by posting larger receive packet buffers. However, due to SKB truesize effects, posting large (e.g, PAGE_SIZE) buffers reduces the throughput of workloads that do not benefit from GRO and have no large inbound packets. This
2013 Nov 13
0
[PATCH net-next 4/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...> I looked at how ewma works, and although it is computationally efficient, > and it does what it is supposed to do, initially (at the first samples) it is strongly > biased towards the value that was added at the first ewma_add. > I suggest that you print the values of ewma_add() and ewma_read(). If you are > happy with the results, then ignore my comments. If you are not, then I can > provide a version that does better for the first samples. > Unfortunately, it will be slightly less efficient. Value is clamped by (GOOD_PACKET_LEN, PAGE_SIZE - hdr_len) So initial value is cons...
2014 Jan 09
0
[PATCH net-next v2 3/4] virtio-net: auto-tune mergeable rx buffer size for improved performance
...irtio buffer to unsigned long immediately and pass that around everywhere. > /* Compute the packet buffer length for a receive queue. */ > static u16 get_mergeable_buffer_len(struct receive_queue *rq) { > u16 len = clamp_t(u16, MERGEABLE_BUFFER_MIN, > ewma_read(&rq->avg_pkt_len), > MERGEABLE_BUFFER_MAX); > return ALIGN(len, MERGEABLE_BUFFER_ALIGN); > } > > Best, > > Mike
2014 Jan 16
0
[PATCH net-next v4 5/6] lib: Ensure EWMA does not store wrong intermediate values
To ensure ewma_read() without a lock returns a valid but possibly out of date average, modify ewma_add() by using ACCESS_ONCE to prevent intermediate wrong values from being written to avg->internal. Suggested-by: Eric Dumazet <eric.dumazet at gmail.com> Signed-off-by: Michael Dalton <mwdalton at google.c...
2014 Jan 17
7
[PATCH net-next v6 0/6] virtio-net: mergeable rx buffer size auto-tuning
The virtio-net device currently uses aligned MTU-sized mergeable receive packet buffers. Network throughput for workloads with large average packet size can be improved by posting larger receive packet buffers. However, due to SKB truesize effects, posting large (e.g, PAGE_SIZE) buffers reduces the throughput of workloads that do not benefit from GRO and have no large inbound packets. This
2014 Jan 17
7
[PATCH net-next v6 0/6] virtio-net: mergeable rx buffer size auto-tuning
The virtio-net device currently uses aligned MTU-sized mergeable receive packet buffers. Network throughput for workloads with large average packet size can be improved by posting larger receive packet buffers. However, due to SKB truesize effects, posting large (e.g, PAGE_SIZE) buffers reduces the throughput of workloads that do not benefit from GRO and have no large inbound packets. This
2014 Jan 07
0
[PATCH net-next v2 4/4] virtio-net: initial debugfs support, export mergeable rx buffer size
...00,18 +638,30 @@ static int add_recvbuf_big(struct receive_queue *rq, gfp_t gfp) return err; } +static unsigned int get_mergeable_buf_len(struct ewma *avg_pkt_len) +{ + const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); + unsigned int len; + + len = hdr_len + clamp_t(unsigned int, ewma_read(avg_pkt_len), + GOOD_PACKET_LEN, PAGE_SIZE - hdr_len); + return ALIGN(len, L1_CACHE_BYTES); +} + static int add_recvbuf_mergeable(struct receive_queue *rq, gfp_t gfp) { const unsigned int ring_size = rq->mrg_buf_ctx_size; - const size_t hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf);...