lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Jun 2016 20:41:35 +0200
From:	Jesper Dangaard Brouer <>
To:	"Michael S. Tsirkin" <>
Cc:, Jason Wang <>,
	Eric Dumazet <>,,, Steven Rostedt <>,,
Subject: Re: [PATCH RFC v7 0/5] skb_array: array based FIFO for skbs

I applied this V7 to my github tree:

And adjusted my benchmark and unit-tests of this skb_array API.
Added an unit test of re-sizing to small queue size.

On Thu, 2 Jun 2016 19:08:14 +0300 "Michael S. Tsirkin" <> wrote:

> My testing seems to show that at least for the common usecase
> in networking, which isn't lockless, circular buffer
> with indices does not perform that well, because
> each index access causes a cache line to bounce between
> CPUs, and index access causes stalls due to the dependency.
> By comparison, an array of pointers where NULL means invalid
> and !NULL means valid

I confirm and validate that this is a good approach.
In module skb_array_parallel01:

> As this might be useful outside of networking, I implemented
> a generic array of void pointers, with a type-safe wrapper for skbs.


> The only issue is with calls within a loop using the __ptr_ring_XXX
> accessors - in theory compiler could hoist accesses out of the loop.
> Following volatile-considered-harmful.txt I merely
> documented that callers that busy-poll should invoke cpu_relax().
> Most people will use the external skb_array_XXX APIs with a spinlock,
> so this should not be an issue for them.

I would like to see some bulking support...

As my experiments[1] show that alf_queue (primarily) can beat skb_array due
to bulking support.  It seems like an obvious optimization for the virt
tun use-case to bulk dequeue SKBs.

Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  Author of


Powered by blists - more mailing lists