per-cpu polling(4) support
Sepherosa Ziehau
sepherosa at gmail.com
Fri Sep 14 06:58:28 PDT 2007
Hi all,
Following patch adds per-cpu polling(4) support:
http://leaf.dragonflybsd.org/~sephe/pcpu_polling.diff
It is against HEAD. You need to apply it under /usr/src. At least
quickworld and quickkernel are required.
You need to set tunable kern.polling.cpumask to make specific CPU
capable of polling:
e.g. 0x1 - CPU0, 0x3 - CPU{0,1} ...
It also implies that you can do polling on CPU1 instead of CPU0 by
setting kern.polling.cpumask to 0x2
To put NIC on a polling capable CPU_Y; Whether NIC is on polling
capable CPU_Z or not does not matter:
ifconfig ifaceX pollcpu Y
To pull NIC off a polling capable CPU:
ifconfig ifaceX -polling
kern.polling.Y.{nodes} contain sysctl nodes for CPU_Y
Noticeable changes:
1) kern.polling.{nodes} contain sysctl nodes for lowest polling
capable CPU, which is not necessarily CPU0 depending on
kern.polling.cpumask tunable (default is CPU0)
2) ifconfig ifaceX polling, will put ifaceX onto the lowest polling
capable CPU, which is not necessarily CPU0 depending on
kern.polling.cpumask tunable (default is CPU0)
3) Polling is enabled by default on polling capable CPUs
4) If polling capable CPU has no NICs associated, its poll clock rate
will be reduced to 1/sec
Please review it.
Best Regards,
sephe
--
Live Free or Die
More information about the Submit
mailing list