http://ra-ga.livejournal.com/ ([identity profile] ra-ga.livejournal.com) wrote in [personal profile] nuclight 2011-08-03 09:45 pm (UTC)

>номером CPU у кернельного треда
ну ок, через пару часов проверю. как раз под рукой есть

CPU: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (2394.28-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s) x 2 SMT threads

igb0:
[Error: Irreparable invalid markup ('<intel(r)>') in entry. Owner must fix manually. Raw contents below.]

>номером CPU у кернельного треда
ну ок, через пару часов проверю. как раз под рукой есть

CPU: Intel(R) Xeon(R) CPU E5620 @ 2.40GHz (2394.28-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s) x 2 SMT threads

igb0: <Intel(R) PRO/1000 Network Connection version - 1.9.5> port 0x1020-0x103f mem 0xb1920000-0xb193ffff,0xb1944000-0xb1947fff irq 40 at device 0.0 on pci1
igb0: Using MSIX interrupts with 5 vectors

>>вопрос был "как изнутри pf узнать что сейчас мы выполняемся на cpu0?"
>э, а нахрена?

Ответ комплексный.

1)http://alouche.net/blog/2010/08/24/rps-and-rfs-kernel-network-stack/
2)http://kerneltrap.org/mailarchive/linux-netdev/2010/7/22/6281568

"Some legacy applications being not SMP friendly, one way to scale a
server is to run multiple copies of them.

Instead of randomly choosing an instance, we can use the cpu number as a
key so that softirq handler for a whole instance is running on a single
cpu, maximizing cache effects in TCP/UDP stacks."

Как пример таких приложений - node.js, python-gevent, bind.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting