From owner-svn-src-projects@FreeBSD.ORG Fri Nov 14 15:36:49 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33701BAC; Fri, 14 Nov 2014 15:36:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2064179A; Fri, 14 Nov 2014 15:36:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAEFanNW096763; Fri, 14 Nov 2014 15:36:49 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAEFamR6096762; Fri, 14 Nov 2014 15:36:48 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201411141536.sAEFamR6096762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 14 Nov 2014 15:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r274506 - projects/sendfile/sys/kern X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 15:36:49 -0000 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) {