Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-03-14 03:57:09 UTC
Modified files:
Tag: u2_10_12_branch
ircd/msgq.c ChangeLog
Log message:
Avoid needless server panics when BUFFERPOOL is configured too small
(or otherwise runs out).
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.77 ircu2.10/ChangeLog:1.710.2.78
--- ircu2.10/ChangeLog:1.710.2.77 Mon Mar 13 19:45:52 2006
+++ ircu2.10/ChangeLog Mon Mar 13 19:56:58 2006
@@ -1,3 +1,11 @@
+2006-03-13 Michael Poole <[EMAIL PROTECTED]>
+
+ * ircd/msgq.c (msgq_vmake): Try to clear msgbuf freelist after
+ killing clients, so that that case does not lead immediately to a
+ server panic.
+ (msgq_count_memory): Report total buffer text used as a way to
+ determine whether the BUFFERPOOL value is marginal.
+
2006-03-02 Michael Poole <[EMAIL PROTECTED]>
* include/ircd_osdep.h (os_socket): New parameter.
Index: ircu2.10/ircd/msgq.c
diff -u ircu2.10/ircd/msgq.c:1.12 ircu2.10/ircd/msgq.c:1.12.2.1
--- ircu2.10/ircd/msgq.c:1.12 Mon May 9 20:43:08 2005
+++ ircu2.10/ircd/msgq.c Mon Mar 13 19:56:58 2006
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Outbound message queue implementation.
- * @version $Id: msgq.c,v 1.12 2005/05/10 03:43:08 entrope Exp $
+ * @version $Id: msgq.c,v 1.12.2.1 2006/03/14 03:56:58 entrope Exp $
*/
#include "config.h"
@@ -359,10 +359,12 @@
}
if (!mb) { /* OK, try killing a client */
kill_highest_sendq(0); /* Don't kill any server connections */
+ msgq_clear_freembs(); /* Release whatever was just freelisted */
mb = msgq_alloc(0, BUFSIZE);
}
if (!mb) { /* hmmm... */
kill_highest_sendq(1); /* Try killing a server connection now */
+ msgq_clear_freembs(); /* Clear freelist again */
mb = msgq_alloc(0, BUFSIZE);
}
if (!mb) /* AIEEEE! */
@@ -564,9 +566,10 @@
/* Data for Msg's is simple, so just send it */
send_reply(cptr, SND_EXPLICIT | RPL_STATSDEBUG,
- ":Msgs allocated %d(%zu) used %d(%zu)", MQData.msgs.alloc,
- MQData.msgs.alloc * sizeof(struct Msg), MQData.msgs.used,
- MQData.msgs.used * sizeof(struct Msg));
+ ":Msgs allocated %d(%zu) used %d(%zu) text %zu",
+ MQData.msgs.alloc, MQData.msgs.alloc * sizeof(struct Msg),
+ MQData.msgs.used, MQData.msgs.used * sizeof(struct Msg),
+ MQData.tot_bufsize);
/* count_memory() wants to know the total */
*msg_alloc = MQData.msgs.alloc * sizeof(struct Msg);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches