On Tue, 2015-05-26 at 11:00 -0700, Tom Herbert wrote: > On Tue, May 26, 2015 at 10:18 AM, Eric Dumazet <[email protected]> wrote: > > On Tue, 2015-05-26 at 09:34 -0700, Tom Herbert wrote: > >> Added matching of CPU to a socket CPU mask. This is useful for TCP > >> listeners and unconnected UDP. This works with SO_REUSPORT to steer > >> packets to listener sockets based on CPU affinity. These patches > >> allow steering packets to listeners based on numa locality. This is > >> only useful for passive connections. > >> > >> v2: > >> - Add cache alignment for fields used in socket lookup in sock_common > >> - Added UDP test results > > > > What about the feedback I gave earlier Tom ??? > > > > This cannot work for TCP in its current state. > > > It does work and it fixes cache server locality issues we are seeing. > Right now half of our connections are persistently crossing numa nodes > on receive-- this is having big negative impact. Yes, there may be > edge conditions where SYN goes to a different CPU than the rest of the > flow (probably need RFS or flow director for that problem), and that > sounds like something nice to fix, but this patch is not dependent on > that. Besides, did you foresee an API change would be required?
With current stack, there is no guarantee SYN and ACK packets are handled by same cpu. These are no edge conditions, but real ones, even with RFS. Not everyone tweaks /proc/irq/*/smp_affinity Default is still allowing cpus being almost random (affinity=fffffff) That was partly for these reasons that SO_REUSEPORT (for TCP) could not use cpu number, but a flow hash to select the target socket. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
