On Fri, Jul 22, 2016 at 6:39 AM, Adrian Chadd <adr...@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
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to