Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 989C211C8D for ; Mon, 8 Sep 2014 15:53:13 +0000 (UTC) Received: (qmail 50844 invoked by uid 500); 8 Sep 2014 15:53:08 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 50784 invoked by uid 500); 8 Sep 2014 15:53:08 -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 50771 invoked by uid 99); 8 Sep 2014 15:53:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2014 15:53:08 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 76.96.62.56 is neither permitted nor denied by domain of jim@jagunet.com) Received: from [76.96.62.56] (HELO qmta06.westchester.pa.mail.comcast.net) (76.96.62.56) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2014 15:53:02 +0000 Received: from omta01.westchester.pa.mail.comcast.net ([76.96.62.11]) by qmta06.westchester.pa.mail.comcast.net with comcast id ofCR1o0020EZKEL56fsi4E; Mon, 08 Sep 2014 15:52:42 +0000 Received: from [192.168.199.10] ([69.251.80.74]) by omta01.westchester.pa.mail.comcast.net with comcast id ofsh1o00T1cCKD93MfshU3; Mon, 08 Sep 2014 15:52:42 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [Patch] Async write completion for the full connection filter stack From: Jim Jagielski In-Reply-To: <715A3AE8-8015-4537-943F-A34E0E2A76F7@sharp.fm> Date: Mon, 8 Sep 2014 11:52:40 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <715A3AE8-8015-4537-943F-A34E0E2A76F7@sharp.fm> To: dev@httpd.apache.org X-Mailer: Apple Mail (2.1878.6) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1410191562; bh=srkuBNSi1nm3yURrVOAzALg6Cs4iNiDE2PErTg3jLfU=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=uNYJN7NodbQuGuwUV8qBMrlGaFaPOBhixFm+ghtaAqo6J8IOPzhdzk0dhrpkBJvXE 6R4zq7HfaIdu830nqXbSX/erG0YazDfWsB1ySiAR99sD+YFTJ/L4c+8eUqk8eKg81g +rfE3eZBjhkIJ45OPc8jPShzmQJDhTLQWp5LJuSWAGqNkTaUDCjEing9t9uC+4jwNS 34XL0CshKvWod8OBplqmVdGz7wrEsph72gQXL/+3EcoEh6GzUwc9YW/9ko0Vm1p0Vm 70R3V03qhRjBe1y7v97Fwllle2gfKMqc+SPvMg8xjvq/X2kjHymkDBWhxZ9AHT5UOF hhDMTKBDLQMYg== X-Virus-Checked: Checked by ClamAV on apache.org Gotcha... +1 On Sep 8, 2014, at 11:29 AM, Graham Leggett wrote: > On 08 Sep 2014, at 3:50 PM, Jim Jagielski wrote: >=20 >> This is pretty cool... haven't played too much with it, but >> via inspection I like the implementation. >>=20 >> One question: >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- server/util_filter.c (revision 1622873) >> +++ server/util_filter.c (working copy) >> @@ -566,6 +566,16 @@ >> { >> if (next) { >> apr_bucket *e; >> + unsigned int activity; >> + int empty =3D APR_BRIGADE_EMPTY(bb); >> + apr_status_t status; >> ... >> + while (APR_SUCCESS =3D=3D status && empty) { >> + next =3D next->next; >> + if (next && next->c->activity =3D=3D activity) { >> + status =3D next->frec->filter_func.out_func(next, = bb); >> + } >> + else { >> + break; >> + } >> + } >> + >> + return status; >>=20 >> Why does while check for empty? Wouldn't it be faster to >> wrap that while in a 'if (empty)' ? It would safe an >> addition check on a var that doesn't change on each loop >> thru the while(). >=20 > It would - that was originally an if that became a while when I = realised we had to compensate for multiple filters not calling = ap_pass_brigade(), instead of just one. >=20 > The new patch takes out empty completely and instead tracks = c->data_in_output_filters, which could change during the loop. >=20 > Regards, > Graham > =97 >=20