freebsd_amp_hwpstate/sys/pci
David Malone a5c4836d39 Replace the mbuf external reference counting code with something
that should be better.

The old code counted references to mbuf clusters by using the offset
of the cluster from the start of memory allocated for mbufs and
clusters as an index into an array of chars, which did the reference
counting. If the external storage was not a cluster then reference
counting had to be done by the code using that external storage.

NetBSD's system of linked lists of mbufs was cosidered, but Alfred
felt it would have locking issues when the kernel was made more
SMP friendly.

The system implimented uses a pool of unions to track external
storage. The union contains an int for counting the references and
a pointer for forming a free list. The reference counts are
incremented and decremented atomically and so should be SMP friendly.
This system can track reference counts for any sort of external
storage.

Access to the reference counting stuff is now through macros defined
in mbuf.h, so it should be easier to make changes to the system in
the future.

The possibility of storing the reference count in one of the
referencing mbufs was considered, but was rejected 'cos it would
often leave extra mbufs allocated. Storing the reference count in
the cluster was also considered, but because the external storage
may not be a cluster this isn't an option.

The size of the pool of reference counters is available in the
stats provided by "netstat -m".

PR:		19866
Submitted by:	Bosko Milekic <bmilekic@dsuper.net>
Reviewed by:	alfred (glanced at by others on -net)
2000-08-19 08:32:59 +00:00
..
agp.c Add support for Intel's i810 chipset with integrated graphics. An 2000-07-12 10:13:07 +00:00
agp_ali.c
agp_amd.c
agp_i810.c Add support for Intel's i810 chipset with integrated graphics. An 2000-07-12 10:13:07 +00:00
agp_if.m
agp_intel.c
agp_sis.c
agp_via.c
agppriv.h Add support for Intel's i810 chipset with integrated graphics. An 2000-07-12 10:13:07 +00:00
agpreg.h Add support for Intel's i810 chipset with integrated graphics. An 2000-07-12 10:13:07 +00:00
agpvar.h
alpm.c
amd.c
amd.h
cy_pci.c
cy_pcireg.h
dc21040reg.h
ide_pcireg.h
if_ar_p.c
if_dc.c Close PR 20438. Make fix for preserving LED settings conditional on 2000-08-07 17:03:20 +00:00
if_dcreg.h Grrrr. Add definition for DC_WDOG_CTLWREN. I made this change yesterday 2000-08-02 16:31:11 +00:00
if_de.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_devar.h
if_en_pci.c
if_fxp.c Fix a bug brought to light by the people working on SMPng. I don't quite 2000-08-11 17:47:55 +00:00
if_fxpreg.h
if_fxpvar.h
if_mn.c
if_rl.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_rlreg.h
if_sf.c Close PR# 19904: remember to call sf_setmulti() when initializing the 2000-07-14 19:11:02 +00:00
if_sfreg.h
if_sis.c sis_miibus_writereg() was checking for SIS_TYPE_900 and phy != 0 twice 2000-07-14 05:30:48 +00:00
if_sisreg.h
if_sk.c Replace the mbuf external reference counting code with something 2000-08-19 08:32:59 +00:00
if_skreg.h Replace the mbuf external reference counting code with something 2000-08-19 08:32:59 +00:00
if_sr_p.c
if_ste.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_stereg.h
if_ti.c Replace the mbuf external reference counting code with something 2000-08-19 08:32:59 +00:00
if_tireg.h Replace the mbuf external reference counting code with something 2000-08-19 08:32:59 +00:00
if_tl.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_tlreg.h
if_tx.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_txvar.h
if_vr.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_vrreg.h
if_wb.c Replace the mbuf external reference counting code with something 2000-08-19 08:32:59 +00:00
if_wbreg.h
if_wx.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_wxreg.h
if_wxvar.h
if_xl.c Make all Ethernet drivers attach using ether_ifattach() and detach using 2000-07-13 22:54:34 +00:00
if_xlreg.h
intpm.c
intpmreg.h
isp_pci.c Part of major rewrite for core version 2.0- clarification of 2000-08-01 05:16:49 +00:00
locate.pl
meteor.c
meteor_reg.h
ncr.c
ncrreg.h
ohci_pci.c
pccbb.c
pccbbreg.h
pccbbvar.h
pci.c
pci_compat.c
pci_if.m
pcic_p.c
pcic_p.h
pcireg.h
pcisupport.c Add the ESS Solo-1 to generic chip match. 2000-08-03 13:46:52 +00:00
pcivar.h
scsiiom.c
simos.c
simos.h
ti_fw.h Update the Tigon driver to support 1000baseTX gigE over copper AceNIC 2000-07-20 22:24:43 +00:00
ti_fw2.h Use a custom Tigon 2 firmware image, hopefully temporarily. This is 2000-07-26 23:55:34 +00:00
uhci_pci.c
xmaciireg.h
xrpu.c