Closed jlijian3 closed 9 years ago
可以关注一下Receive-CPU-Select部分的代码
看了一下process_rcs_rps,__inet_lookup?established表还是全局的? source port encode cpuid的方法不打算用了吗?
对的,在process_rcs_rps。 在加载了Fastsocket的内核工作的过程中,连接对应的sock会记录着进程所在的cpu编号,于是回包查找sock的时候就可以知道分派到哪个cpu上了。 查找sock的过程是通过__inet_lookup实现的,还是和其他地方一样查established表和listen表,得到sock之后才会分配到一个cpu上 考虑到这种实现比source port encode cpuid的方法通用性会更好,比如cpu数多了之后策略上不用考虑端口资源紧张的问题等,希望以后能取代rfd
rfd的代码为什么注释掉了?这样proxy 的回包如何保证分派到同一个cpu?