summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-09-23 10:49:56 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-09-23 10:49:56 +0000
commit1816a672cc35d7711ba2b9acd74e0e09e8fcf9f1 (patch)
tree2abe8c2f9a4d6570f5c9fb5db71914d81875a4f6 /usr.bin
parentd69b908469935164394629f269f322e458433ad8 (diff)
tweak the mclgeti algorithm to behave better under load.
instead of letting hardware rings grow on every interrupt, restrict it so it can only grow once per softclock tick. we can only punish the rings on softclock ticks, so it make sense to only grow on softclock tick boundaries too. the rings are now punished after >1 lost softclock tick rather than >2. mclgeti is now more aggressive at detecting livelock. the rings get punished by an 8th, rather than by half. we now allow the rings to be punished again even if the system is already considered in livelock. without this diff a livelocked system will have its rx ring sizes scale up and down very rapidly, while holding the rings low for too long. this affected throughput significantly. discussed and tested heavily at j2k10. there are still some games with softnet we can play, but this is a good first step. "put it in" and ok deraadt@ ok claudio@ krw@ henning@ mcbride@ if we find out that it sucks we can pull it out again later. till then we'll run with it and see how it goes.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/mbufs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c
index 2bbbbc979a0..dac87bc8430 100644
--- a/usr.bin/systat/mbufs.c
+++ b/usr.bin/systat/mbufs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbufs.c,v 1.28 2010/08/01 05:30:13 blambert Exp $ */
+/* $OpenBSD: mbufs.c,v 1.29 2010/09/23 10:49:55 dlg Exp $ */
/*
* Copyright (c) 2008 Can Erkin Acar <canacar@openbsd.org>
*
@@ -349,9 +349,9 @@ showmbuf(struct if_info *ifi, int p, int showif)
#if NOTYET
print_fld_uint(FLD_MB_RXDELAY, ifi->data.ifi_rxdelay);
print_fld_uint(FLD_MB_TXDELAY, ifi->data.ifi_txdelay);
-#endif
if (ifi->data.ifi_livelocks)
print_fld_size(FLD_MB_LLOCKS, ifi->data.ifi_livelocks);
+#endif
if (p >= 0 && p < mclpool_count) {
struct mclpool *mp = &ifi->data.ifi_mclpool[p];