From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXdTm-00051Y-8N for qemu-devel@nongnu.org; Tue, 08 Apr 2014 17:22:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXdTf-0005mb-7K for qemu-devel@nongnu.org; Tue, 08 Apr 2014 17:22:50 -0400 Received: from fldsmtpe04.verizon.com ([140.108.26.143]:44393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXdTe-0005lH-Tw for qemu-devel@nongnu.org; Tue, 08 Apr 2014 17:22:43 -0400 From: Don Slutz Message-ID: <5344689F.3030009@terremark.com> Date: Tue, 08 Apr 2014 17:22:39 -0400 MIME-Version: 1.0 References: <87y4zg1edy.fsf@blackfin.pond.sub.org> <878urgw5iq.fsf@blackfin.pond.sub.org> In-Reply-To: <878urgw5iq.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.1 v2 0/2] Generalise FIFO to more integer types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Beniamino Galvani , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Don Slutz On 04/08/14 05:10, Markus Armbruster wrote: > Peter Crosthwaite writes: > >> On Tue, Apr 8, 2014 at 5:14 PM, Markus Armbruster wrote: >>> Peter Crosthwaite writes: >>> >>>> There is a utility helper for dealing with 8 bit fifos. This should be >>>> applicable to other integer widths as well. These two patches >>>> generalise this FIFO to work for 16, 32 and 64 bit ints. >>> Can you show us a user for the wider FIFOs? >>> >> Hi Markus, >> >> I have a couple out of tree that are incomplete and a bit out of scope >> of this series. Rather not wait and send a complicated series spanning >> multiple sub-systrems. I guess I could shop around for an easy lead >> example to fix, but does the series stand in its own right? > I don't like infrastructure without an in-tree user. Even if it's > "only" a sensible, straightforward generalization of existing > infrastructure. > > Infrastructure without a user tends to rot. Probably not a serious > issue in this particular case. > > The cost of applying a change and maintaining the additional complexity > needs to be justified by some gain. Even when the costs are small, like > they probably are in this particular case. An in-tree user could > probably justify easily. I am not sure that the run time cost is the best. Looks more like c++ templates should be done via macros. Just like include/exec/softmmu_header.h: void glue(glue(fifo, 8), _create)(Fifo *fifo, uint32_t capacity); void glue(glue(fifo, 8), _push)(Fifo *fifo, glue(glue(uint, 8), _t) data); ... Also that would mean not doing the patch #1 at all. That way all the cost is at compile time, and only the versions currently used are generated. -Don Slutz