Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2016 09:54:08 +0800
From:      Sepherosa Ziehau <sepherosa@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Andrew Gallatin <gallatin@cs.duke.edu>, FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: proposal: splitting NIC RSS up from stack RSS
Message-ID:  <CAMOc5cxEWqWOMPSXFe3=N5S93bs8RO-XX22QghtHd8vC5xuNjA@mail.gmail.com>
In-Reply-To: <CAJ-VmomHYVCknVkDLF%2Bb8Gc5wBWxkddEMY3dhvbxJihLZHyTLg@mail.gmail.com>
References:  <CAJ-Vmo=Wj3ZuC6mnVCxonQ74nfEmH7CE=TP3xhLzWifdBxxfBQ@mail.gmail.com> <306af514-70ff-f3bf-5b4f-da7ac1ec6580@cs.duke.edu> <CAJ-VmomHYVCknVkDLF%2Bb8Gc5wBWxkddEMY3dhvbxJihLZHyTLg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 22, 2016 at 6:39 AM, Adrian Chadd <adrian@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMOc5cxEWqWOMPSXFe3=N5S93bs8RO-XX22QghtHd8vC5xuNjA>