Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411988

Re: [PATCH v6 0/3] skb_array: array based FIFO for skbs

From Jason Wang <jasowang@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 0/3] skb_array: array based FIFO for skbs
Date 2016-06-02 10:20 +0200
Message-ID <rFw1c-3rP-17@gated-at.bofh.it> (permalink)
References <rFdUC-8wg-17@gated-at.bofh.it> <rFsTD-1nj-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016年06月02日 12:51, David Miller wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
> Date: Wed, 1 Jun 2016 15:54:34 +0300
>
>> This is in response to the proposal by Jason to make tun
>> rx packet queue lockless using a circular buffer.
>> 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, can be updated without messing up barriers
>> at all and does not have this issue.
>>
>> On the flip side, cache pressure may be caused by using large queues.
>> tun has a queue of 1000 entries by default and that's 8K.
>> At this point I'm not sure this can be solved efficiently.
>> The correct solution might be sizing the queues appropriately.
>>
>> Here's an implementation of this idea: it can be used more
>> or less whenever sk_buff_head can be used, except you need
>> to know the queue size in advance.
>   ...
>
> I have no fundamental issues with this piece of infrastructure, but when
> it gets included I want this series to include at least one use case.
>
> This can be an adaptation of Jason's tun rx packet queue changes, or
> similar.
>
> Thanks.

Right, I'm working on using skb array for tun, will post the patch in 
the following days.

Thanks

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/3] skb_array: array based FIFO for skbs "Michael S. Tsirkin" <mst@redhat.com> - 2016-06-01 15:00 +0200
  [PATCH v6 2/3] ptr_ring: ring test "Michael S. Tsirkin" <mst@redhat.com> - 2016-06-01 15:00 +0200
  [PATCH v6 3/3] skb_array: array based FIFO for skbs "Michael S. Tsirkin" <mst@redhat.com> - 2016-06-01 15:00 +0200
    Re: [PATCH v6 3/3] skb_array: array based FIFO for skbs Jason Wang <jasowang@redhat.com> - 2016-06-02 10:20 +0200
      Re: [PATCH v6 3/3] skb_array: array based FIFO for skbs "Michael S. Tsirkin" <mst@redhat.com> - 2016-06-02 11:30 +0200
  [PATCH v6 1/3] ptr_ring: array based FIFO for pointers "Michael S. Tsirkin" <mst@redhat.com> - 2016-06-01 15:00 +0200
  Re: [PATCH v6 0/3] skb_array: array based FIFO for skbs David Miller <davem@davemloft.net> - 2016-06-02 07:00 +0200
    Re: [PATCH v6 0/3] skb_array: array based FIFO for skbs Jason Wang <jasowang@redhat.com> - 2016-06-02 10:20 +0200

csiph-web