lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 21 Apr 2011 18:25:12 +0200 From: Eric Dumazet <eric.dumazet@...il.com> To: zhou rui <zhourui.cn@...il.com> Cc: netdev@...r.kernel.org Subject: Re: RPS will assign different smp_processor_id for the same packet? Le jeudi 21 avril 2011 à 18:08 +0200, Eric Dumazet a écrit : > Le jeudi 21 avril 2011 à 23:50 +0800, zhou rui a écrit : > > kernel 2.6.36.4 > > CONFIG_RPS=y but not set the cpu mask > > > > /sys/class/net/eth1/queues/rx-0 # cat rps_cpus > > 00 > > > > register a hook func: > > prot_hook.func = packet_rcv; > > prot_hook.type = htons(ETH_P_ALL); > > dev_add_pack(&prot_hook); > > > > > > replay the same traffic in very slow speed, printk the > > smp_processor_id in packet_rcv(): > > first time: > > cpu=4 > > cpu=3 > > cpu=6 > > cpu=7 > > > > second time: > > cpu=7 > > cpu=1 > > cpu=5 > > cpu=2 > > > > is it normal? > > Yes it is. > > What would you expect ? > If rps_cpus contains only '0' bits, it basically means RPS is not active for this input queue. CPU is therefore not changed : The cpu handling NAPI on your network device directly calls upper linux stack. Seeing your traces, it also means your device spreads its interrupts on many different cpus, this might be not optimal. Check /proc/irq/{irq_number}/smp_affinity, it probably contains "ff" -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists