freebsd-skq/sys/dev/xen
glebius 163857deb4 New way to manage reference counting of mbuf external storage.
The m_ext.ext_cnt pointer becomes a union. It can now hold the refcount
value itself. To tell that m_ext.ext_flags flag EXT_FLAG_EMBREF is used.
The first mbuf to attach a cluster stores the refcount. The further mbufs
to reference the cluster point at refcount in the first mbuf. The first
mbuf is freed only when the last reference is freed.

The benefit over refcounts stored in separate slabs is that now refcounts
of different, unrelated mbufs do not share a cache line.

For EXT_EXTREF mbufs the zone_ext_refcnt is no longer needed, and m_extadd()
becomes void, making widely used M_EXTADD macro safe.

For EXT_SFBUF mbufs the sf_ext_ref() is removed, which was an optimization
exactly against the cache aliasing problem with regular refcounting.

Discussed with:		rrs, rwatson, gnn, hiren, sbruno, np
Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D5396
Sponsored by:		Netflix
2016-03-01 00:17:14 +00:00
..
balloon xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
blkback xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
blkfront Don't dereference a pointer immediately after determining that it is 2016-02-14 13:42:16 +00:00
console xen/console: Introduce a new console driver for Xen guest 2015-10-08 16:39:43 +00:00
control xen: fix dropping bitmap IPIs during resume 2015-11-18 18:11:19 +00:00
debug
evtchn
grant_table xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
netback New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
netfront xen-netfront: remove useless NULL check in netif_free 2016-02-11 11:57:12 +00:00
pci
pcifront Add domain support to PCI bus allocation 2015-09-16 23:34:51 +00:00
privcmd xen: introduce a newbus function to allocate unused memory 2015-05-08 14:48:40 +00:00
pvcpu
timer
xenpci xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00
xenstore xen: Code cleanup and small bug fixes 2015-10-21 10:44:07 +00:00