kernel - Fix mbuf cluster statistics, fix type change bug
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 31 Oct 2011 21:18:52 +0000 (14:18 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 31 Oct 2011 21:18:52 +0000 (14:18 -0700)
commit461213b7b36154b1d0b6af709fd49954233622d6
tree42f0fd1f1f35180a0d6adef895475ba272b53a52
parent01630da950d77802336fdbdfdfc457c08258566b
kernel - Fix mbuf cluster statistics, fix type change bug

* The mbuf cluster statistics were not properly handling a sharecount race case,
  causing the cluster count to continuously increase under heavy loads.

* atomic_set_short() was being improperly used to set m->m_type, causing the type field
  to collect a logical OR of changeouts.  Just set it normally.

* We don't need to use atomic ops for per-cpu stats updates.

Reported-by: Peter Avalos <peter@theshell.com>, "Samuel J. Greear" <sjg@evilcode.net>
sys/kern/uipc_mbuf.c