summaryrefslogtreecommitdiffstats
path: root/sys/dev/bktr
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2005-02-10 22:23:02 +0000
committerbmilekic <bmilekic@FreeBSD.org>2005-02-10 22:23:02 +0000
commit885ba938474734fbe7b08d698b6f7e24bad20fab (patch)
treeb0573ee40c1a11c878bda633ea681170cf9967bd /sys/dev/bktr
parentad0e8354e0af089db5146f3e11af06e15484c82f (diff)
downloadFreeBSD-src-885ba938474734fbe7b08d698b6f7e24bad20fab.zip
FreeBSD-src-885ba938474734fbe7b08d698b6f7e24bad20fab.tar.gz
Optimize the way reference counting is performed with Mbufs. We
do not need to perform an extra memory fetch in the Packet (Mbuf+Cluster) constructor to initialize the reference counter anymore. The reference counts are located in a separate memory region (in the slab header, because this zone is UMA_ZONE_REFCNT), so the memory fetch resulted very often in a cache miss. Additionally, and perhaps more significantly, optimize the free mbuf+cluster (packet) case, which is very common, to no longer require an atomic operation on free (to verify the reference counter) if the reference on the cluster has never been increased (also very common). Reduces an atomic on mbuf free on average. Original patch submitted by: Gerrit Nagelhout <gnagelhout@sandvine.com>
Diffstat (limited to 'sys/dev/bktr')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud