kqueue: Add simple per-cpu cache for the knote
commit1010d4c0d99645b70b06e518d009832ba33e267a
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 Mar 2016 16:06:43 +0000 (5 00:06 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 4 Mar 2016 16:06:43 +0000 (5 00:06 +0800)
tree3bf028b49d3a40362f9d8ce95e4d7bb26cb58b3c
parent5c672d8fd9ab0898aec2a11f3386f222bb38d6c9
kqueue: Add simple per-cpu cache for the knote

This moves the malloc(M_WAITOK) out of the kqueue token for most of
the time.  This significantly reduces the kqueue token contention when
TCP connect rate is @395Kconns/s on connect side: contention rate
dropped from ~150K/s to ~50K/s.
sys/kern/kern_event.c