summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-11-24 13:10:17 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-11-24 13:10:17 +0000
commitee7448c97382f6524f4bea35169d58d19086ed4d (patch)
treec77d98bc64b73650606ef2e7e10444e33980f445 /sys/dev/pci
parent886d2362a0e2964795f03a71c0e918b1b37b5214 (diff)
switch from using MCLGET to MCLGETI for clusters going onto the rx ring.
this causes vic to start up with 4 mbufs on the ring, and the allocator will let it increase the number of rx mbufs as usage demands. testing shows that i need only 20 to 30 mbufs on the rx ring to cope with full speed io. we used to always put 100 on the ring, so we're now saving 140k of kernerl virtual address space (70 * MCLBYTES). this relies on the previous commit that copes with failures of mbuf allocation in the rx path. similar changes must be made to all the other drivers. i'll happily review diffs people send in. SUBTLE HINTS ARE COMING YOUR WAY.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_vic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index dfc69993687..2f3ccc9e8e0 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.57 2008/11/24 12:34:29 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.58 2008/11/24 13:10:16 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1362,7 +1362,7 @@ vic_alloc_mbuf(struct vic_softc *sc, bus_dmamap_t map)
if (m == NULL)
return (NULL);
- MCLGET(m, M_DONTWAIT);
+ MCLGETI(m, M_DONTWAIT, &sc->sc_ac.ac_if, MCLBYTES);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
return (NULL);