Date: Fri, 14 Nov 2014 15:36:48 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r274506 - projects/sendfile/sys/kern Message-ID: <201411141536.sAEFamR6096762@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Nov 14 15:36:48 2014 New Revision: 274506 URL: https://svnweb.freebsd.org/changeset/base/274506 Log: Avoid coalescing if new mbuf is normal, but previous one is M_NOTREADY. Sponsored by: Nginx, Inc. Modified: projects/sendfile/sys/kern/uipc_sockbuf.c Modified: projects/sendfile/sys/kern/uipc_sockbuf.c ============================================================================== --- projects/sendfile/sys/kern/uipc_sockbuf.c Fri Nov 14 15:34:52 2014 (r274505) +++ projects/sendfile/sys/kern/uipc_sockbuf.c Fri Nov 14 15:36:48 2014 (r274506) @@ -906,8 +906,8 @@ sbappendcontrol(struct sockbuf *sb, stru * * (2) The mbuf may be coalesced -- i.e., data in the mbuf may be copied into * an mbuf already in the socket buffer. This can occur if an - * appropriate mbuf exists, there is room, and no merging of data types - * will occur. + * appropriate mbuf exists, there is room, both mbufs are not marked as + * not ready, and no merging of data types will occur. * * (3) The mbuf may be appended to the end of the existing mbuf chain. * @@ -937,6 +937,7 @@ sbcompress(struct sockbuf *sb, struct mb M_WRITABLE(n) && ((sb->sb_flags & SB_NOCOALESCE) == 0) && !(m->m_flags & M_NOTREADY) && + !(n->m_flags & M_NOTREADY) && m->m_len <= MCLBYTES / 4 && /* XXX: Don't copy too much */ m->m_len <= M_TRAILINGSPACE(n) && n->m_type == m->m_type) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411141536.sAEFamR6096762>