From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbcFNMEg (ORCPT ); Tue, 14 Jun 2016 08:04:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59645 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750808AbcFNMEe (ORCPT ); Tue, 14 Jun 2016 08:04:34 -0400 Date: Tue, 14 Jun 2016 14:04:28 +0200 From: Jesper Dangaard Brouer To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Jason Wang , Eric Dumazet , davem@davemloft.net, netdev@vger.kernel.org, Steven Rostedt , kvm@vger.kernel.org, brouer@redhat.com Subject: Re: [PATCH v8 4/5] ptr_ring: resize support Message-ID: <20160614140428.7fb2bd94@redhat.com> In-Reply-To: <20160613235445-mutt-send-email-mst@redhat.com> References: <1465851234-13558-1-git-send-email-mst@redhat.com> <20160613235445-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 14 Jun 2016 12:04:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jun 2016 23:54:45 +0300 "Michael S. Tsirkin" wrote: > This adds ring resize support. Seems to be necessary as > users such as tun allow userspace control over queue size. > > If resize is used, this costs us ability to peek at queue without > consumer lock - should not be a big deal as peek and consumer are > usually run on the same CPU. > > If ring is made bigger, ring contents is preserved. If ring is made > smaller, extra pointers are passed to an optional destructor callback. > > Cleanup function also gains destructor callback such that > all pointers in queue can be cleaned up. > > This changes some APIs but we don't have any users yet, > so it won't break bisect. > > Signed-off-by: Michael S. Tsirkin Acked-by: Jesper Dangaard Brouer -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer