From dev-return-8163-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Sep 30 06:11:24 2002 Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 60978 invoked by uid 500); 30 Sep 2002 06:11:23 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 60967 invoked from network); 30 Sep 2002 06:11:23 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Sun, 29 Sep 2002 23:12:49 -0700 From: Greg Stein To: Brian Pane Cc: dev@apr.apache.org Subject: Re: cvs commit: apr-util/buckets apr_brigade.c Message-ID: <20020929231249.A13187@lyra.org> Mail-Followup-To: Brian Pane , dev@apr.apache.org References: <20020929010538.34114.qmail@icarus.apache.org> <20020929171931.B12814@lyra.org> <1033350930.992.17.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <1033350930.992.17.camel@localhost>; from brian.pane@cnet.com on Sun, Sep 29, 2002 at 06:55:27PM -0700 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sun, Sep 29, 2002 at 06:55:27PM -0700, Brian Pane wrote: > On Sun, 2002-09-29 at 17:19, Greg Stein wrote: >... > > One thing I just realized, though: if there is no flush function, then a > > transient could be a problem. I just double-checked apr_brigade_write() and > > it switches over to HEAP buckets for that case. Should _writev follow the > > same pattern? > > You mean, in case the caller then deletes the underlying storage for the > strings in the iovec? Yes, in that case we should use heap buckets. Right. > I'll make a change for this. You da man! > Both the _writev and the _write functions > really need a warning in the documentation: "not guaranteed to be zero > copy, so build your own buckets if you're trying to pass very large > amounts of data." Well... amend that a bit: the caller doesn't have to build buckets IF they pass a flush function. It will be zero-copy when a flush func is provided. Really... *all* calls should have a flush function to encourage zero copy operation. If a flush function is not used, then the caller should revisit what they're doing with the brigade. Cheers, -g -- Greg Stein, http://www.lyra.org/