Re: [RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once

2016-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2016 at 08:42:03PM -0800, John Fastabend wrote: > On 16-11-14 03:06 PM, Michael S. Tsirkin wrote: > > On Thu, Nov 10, 2016 at 08:44:32PM -0800, John Fastabend wrote: > >> Signed-off-by: John Fastabend > > > > This will naturally reduce the cache line bounce > > costs, but so will

Re: [RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once

2016-11-15 Thread John Fastabend
On 16-11-14 03:06 PM, Michael S. Tsirkin wrote: > On Thu, Nov 10, 2016 at 08:44:32PM -0800, John Fastabend wrote: >> Signed-off-by: John Fastabend > > This will naturally reduce the cache line bounce > costs, but so will a _many API for ptr-ring, > doing lock-add many-unlock. > > the number of a

Re: [RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once

2016-11-14 Thread Michael S. Tsirkin
On Thu, Nov 10, 2016 at 08:44:32PM -0800, John Fastabend wrote: > Signed-off-by: John Fastabend This will naturally reduce the cache line bounce costs, but so will a _many API for ptr-ring, doing lock-add many-unlock. the number of atomics also scales better with the lock: one per push instead o

[RFC PATCH 2/2] ptr_ring_ll: pop/push multiple objects at once

2016-11-10 Thread John Fastabend
Signed-off-by: John Fastabend --- include/linux/ptr_ring_ll.h | 22 -- include/linux/skb_array.h | 11 +-- net/sched/sch_generic.c |2 +- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/include/linux/ptr_ring_ll.h b/include/linux/ptr_ring_