INN commit: trunk/innfeed (connection.c)
INN Commit
Russ_Allbery at isc.org
Mon Mar 9 18:47:36 UTC 2009
Date: Monday, March 9, 2009 @ 11:47:36
Author: iulius
Revision: 8376
Remove a part of commit 7382:
Whenever doSomeWrites is called with writes still pending, add a work
callback to do the write at the next opportunity. This should eliminate a
temporary connection deadlock state on flushing, where the response to the
IHAVE body arrived before we finished writing it. Before, doSomeWrites
would have failed to call issueQUIT because writes were still pending, and
then after the writes complete, there's no code to go back and issue it
until the read timeout expires.
It appears that innfeed eats CPU with that callback:
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
25012 news 103 4 8304K 14M run/1 19:08 96.68% 96.68% innfeed
24847 news 95 0 30M 32M run/0 3:56 18.12% 18.12% innd
Modified:
trunk/innfeed/connection.c
--------------+
connection.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Modified: connection.c
===================================================================
--- connection.c 2009-03-08 12:48:36 UTC (rev 8375)
+++ connection.c 2009-03-09 18:47:36 UTC (rev 8376)
@@ -3840,10 +3840,10 @@
{
bool doneSome = false ;
- /* If there's a write pending we can't do anything now. */
+ /* If there's a write pending we can't do anything now.
+ * No addWorkCallback here (otherwise innfeed consumes too much CPU). */
if ( writeIsPending (cxn->myEp) )
{
- addWorkCallback (cxn->myEp,cxnWorkProc,cxn) ;
return ;
}
else if ( writesNeeded (cxn) ) /* something on a queue. */
More information about the inn-committers
mailing list