From owner-svn-src-stable@freebsd.org Mon Oct 10 11:09:10 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C38BC07B4A; Mon, 10 Oct 2016 11:09:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 CEEE9F29; Mon, 10 Oct 2016 11:09:09 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1btYS5-0006oU-Ca; Mon, 10 Oct 2016 14:09:01 +0300 Date: Mon, 10 Oct 2016 14:09:01 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r306661 - in stable/11/sys/dev/cxgbe: . tom Message-ID: <20161010110901.GH6177@zxy.spb.ru> References: <201610032315.u93NFiHE057529@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201610032315.u93NFiHE057529@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 11:09:10 -0000 On Mon, Oct 03, 2016 at 11:15:44PM +0000, John Baldwin wrote: > Author: jhb > Date: Mon Oct 3 23:15:44 2016 > New Revision: 306661 > URL: https://svnweb.freebsd.org/changeset/base/306661 > > Log: > MFC 303405: Add support for zero-copy aio_write() on TOE sockets. > > AIO write requests for a TOE socket on a Chelsio T4+ adapter can now > DMA directly from the user-supplied buffer. This is implemented by > wiring the pages backing the user-supplied buffer and queueing special > mbufs backed by raw VM pages to the socket buffer. The TOE code > recognizes these special mbufs and builds a sglist from the VM page > array associated with the mbuf when queueing a work request to the TOE. > > Because these mbufs do not have an associated virtual address, m_data > is not valid. Thus, the AIO handler does not invoke sosend() directly > for these mbufs but instead inlines portions of sosend_generic() and > tcp_usr_send(). > > An aiotx_buffer structure is used to describe the user buffer (e.g. > it holds the array of VM pages and a reference to the AIO job). The > special mbufs reference this structure via m_ext. Note that a single > job might be split across multiple mbufs (e.g. if it is larger than > the socket buffer size). The 'ext_arg2' member of each mbuf gives an > offset relative to the backing aiotx_buffer. The AIO job associated > with an aiotx_buffer structure is completed when the last reference to > the structure is released. > > Zero-copy aio_write()'s for connections associated with a given > adapter can be enabled/disabled at runtime via the > 'dev.t[45]nex.N.toe.tx_zcopy' sysctl. > > Sponsored by: Chelsio Communications Do you have any public available application patches for support this? May be nginx?