From owner-freebsd-net@FreeBSD.ORG Thu Jul 8 09:59:53 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D251106564A; Thu, 8 Jul 2010 09:59:53 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F33D68FC24; Thu, 8 Jul 2010 09:59:51 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA20835; Thu, 08 Jul 2010 12:59:50 +0300 (EEST) (envelope-from avg@freebsd.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OWntV-0003XL-VK; Thu, 08 Jul 2010 12:59:50 +0300 Message-ID: <4C35A195.5060804@freebsd.org> Date: Thu, 08 Jul 2010 12:59:49 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <7C3D15DD6E8F464998CA1470D8A322F302BB9F72@ES02CO.wgti.net> <20100707205041.GO13238@deviant.kiev.zoral.com.ua> <4C358843.5000001@freebsd.org> <4C358A01.8080206@icyb.net.ua> <20100708082943.GB2439@deviant.kiev.zoral.com.ua> <4C358EE5.8070003@icyb.net.ua> <4C359D21.30308@freebsd.org> In-Reply-To: <4C359D21.30308@freebsd.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , lstewart@freebsd.org, bz@freebsd.org, Andre Oppermann , Ming Fu Subject: Re: kern/123095 kern/131602 sendfile X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jul 2010 09:59:53 -0000 on 08/07/2010 12:40 Andriy Gapon said the following: > on 08/07/2010 11:40 Andriy Gapon said the following: >> on 08/07/2010 11:29 Kostik Belousov said the following: >>> Right, the patch maps the page in sf buffer read-only (on i386 only). >>> But note the parallel posting with m_cat() change. It is still not enough, >>> and I am not set up for the real network testing ATM. >> Could you also try to experiment with mb_dupcl? >> Namely transfer M_RDONLY from source mbuf. > > > Oh, sigh, should have looked at definition of M_WRITABLE() first. As kib has just pointed out to me, m_ext.ref_cnt may go back to one (via source mbuf going away) and then destination mbuf becomes R/W. BTW, perhaps m_collapse() should also use M_WRITABLE instead of directly testing M_RDONLY? -- Andriy Gapon