Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 20709 invoked from network); 16 Feb 2009 10:08:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2009 10:08:27 -0000 Received: (qmail 7495 invoked by uid 500); 16 Feb 2009 10:08:21 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 7218 invoked by uid 500); 16 Feb 2009 10:08:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 7209 invoked by uid 99); 16 Feb 2009 10:08:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 02:08:20 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jorton@redhat.com designates 66.187.237.31 as permitted sender) Received: from [66.187.237.31] (HELO mx2.redhat.com) (66.187.237.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 10:08:12 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1GA7nRa009812; Mon, 16 Feb 2009 05:07:49 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n1GA7oYM012850; Mon, 16 Feb 2009 05:07:50 -0500 Received: from turnip.manyfish.co.uk (vpn-12-192.rdu.redhat.com [10.11.12.192]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n1GA7mjR001993; Mon, 16 Feb 2009 05:07:48 -0500 Received: from jorton by turnip.manyfish.co.uk with local (Exim 4.69) (envelope-from ) id 1LZ0OB-0001tc-56; Mon, 16 Feb 2009 10:07:47 +0000 Date: Mon, 16 Feb 2009 10:07:47 +0000 From: Joe Orton To: Graham Dumpleton Cc: dev@httpd.apache.org Subject: Re: Problems with EOS optimisation in ap_core_output_filter() and file buckets. Message-ID: <20090216100746.GA5873@redhat.com> Mail-Followup-To: Graham Dumpleton , dev@httpd.apache.org References: <88e286470902131525v57cfaab1s58f84c0f76cf264a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <88e286470902131525v57cfaab1s58f84c0f76cf264a@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Organization: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in UK and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson (USA), Charlie Peters (USA) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Virus-Checked: Checked by ClamAV on apache.org On Sat, Feb 14, 2009 at 10:25:08AM +1100, Graham Dumpleton wrote: ... > What the end result of the code is, is that if you have a file bucket > getting this far where length of file is less than 8000 and an EOS > follows it, then the actual file bucket is held over rather than data > being read and buffered. This is as commented is to avoid doing an > mmap+memcpy. What it means though is that the file descriptor within > the file bucket must be maintained and cannot be closed as soon as > ap_pass_brigade() has been called. The call to: ap_save_brigade(f, &ctx->b, &b, ctx->deferred_write_pool); in that code path should result in the FILE bucket and the contained fd being dup()ed. (Though if that is failing, you wouldn't know because of the lack of error checking) You say: > For me this is an issue as the file descriptor has been supplied from > a special object returned by a higher level application and it would > be hard to maintain the file as open beyond the life of the request, > up till end of keep alive or a subsequent request over same > connection. Doing a dup on the file decriptor is also not necessarily > an option. can you explain why a dup shouldn't work? Regards, Joe