proposal: splitting NIC RSS up from stack RSS

Sepherosa Ziehau sepherosa at gmail.com
Fri Jul 22 01:54:10 UTC 2016


On Fri, Jul 22, 2016 at 6:39 AM, Adrian Chadd <adrian at freebsd.org> wrote:
> hi,
>
> Cool! Yeah, the RSS bits thing can be removed, as it's just doing a
> bitmask instead of a % operator to do mapping. I think we can just go
> to % and if people need the extra speed from a power-of-two operation,
> they can reintroduce it.

I thought about it a while ago (the most popular E5-2560v{1,2,3} only
has 6 cores, but E5-2560v4 has 8 cores! :).  Since the raw RSS hash
value is '& 0x1f' (I believe most of the NICs use 128 entry indirect
table as defined by MS RSS) to select an entry in the indirect table,
simply '%' on the raw RSS hash value probably will not work properly;
you will need (hash&0x1f)%mp_ncpus at least.  And well, since the
indirect table's size if 128, you still will get some uneven CPU
workload for non-power-of-2 cpus.  And if you take cpu affinity into
consideration, the situation will be even more complex ...

Thanks,
sephe


More information about the freebsd-net mailing list