svn commit: r359016 - head/sys/netinet
Gleb Smirnoff
glebius at freebsd.org
Fri Mar 20 18:19:13 UTC 2020
Andrew,
On Mon, Mar 16, 2020 at 02:03:27PM +0000, Andrew Gallatin wrote:
A> Log:
A> Avoid a cache miss accessing an mbuf ext_pgs pointer when doing SW kTLS.
A>
A> For a Netflix 90Gb/s 100% TLS software kTLS workload, this reduces
A> the CPI of tcp_m_copym() from ~3.5 to ~2.5 as reported by vtune.
A>
A> Reviewed by: jtl, rrs
A> Sponsored by: Netflix
A> Differential Revision: https://reviews.freebsd.org/D23998
A>
A> Modified:
A> head/sys/netinet/tcp_output.c
A>
A> Modified: head/sys/netinet/tcp_output.c
A> ==============================================================================
A> --- head/sys/netinet/tcp_output.c Mon Mar 16 13:53:29 2020 (r359015)
A> +++ head/sys/netinet/tcp_output.c Mon Mar 16 14:03:27 2020 (r359016)
A> @@ -1907,7 +1907,7 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *ple
A> top = NULL;
A> pkthdrlen = NULL;
A> #ifdef KERN_TLS
A> - if (m->m_flags & M_NOMAP)
A> + if (hw_tls && (m->m_flags & M_NOMAP))
A> tls = m->m_ext.ext_pgs->tls;
A> else
A> tls = NULL;
IMHO, such changes must always be accompanied by a comment. Otherwise, I
can easily imagine someone in couple of years "optimizing" it back with
commit message "Remove extraneous check. m->m_ext.ext_pgs->tls is NULL when tls is off"
--
Gleb Smirnoff
More information about the svn-src-head
mailing list