[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161115162701-mutt-send-email-mst@kernel.org>
Date: Tue, 15 Nov 2016 16:30:57 +0200
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
John Fastabend <john.fastabend@...il.com>
Subject: Re: [RFC PATCH 1/2] net: use cmpxchg instead of spinlock in ptr rings
On Tue, Nov 15, 2016 at 02:32:58PM +0100, Jesper Dangaard Brouer wrote:
> What I would really like to see is a lock-free (locked cmpxchg) queue
> implementation, what like ptr_ring use the array as empty/full check,
> and still (somehow) support bulking.
I think lock-free is overrated for this use-case - we hold the lock
for such a short amount of time.
I think what we want is just a simpler spinlock - one that's faster than
qlock for use-cases that are unfair anyway, like this one where even if
you get the lock in a fair way, FIFO might be full and you won't be able
to queue.
Or find an API to add to FIFO in a fair way.
--
MST
Powered by blists - more mailing lists