From owner-svn-src-head@freebsd.org Sat Jan 7 05:41:47 2017 Return-Path: Delivered-To: svn-src-head@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 9B4BFCA2384; Sat, 7 Jan 2017 05:41:47 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EBBF1B7F; Sat, 7 Jan 2017 05:41:46 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id Pjl4cG8jLW5f5Pjl5cUq7Q; Fri, 06 Jan 2017 22:41:39 -0700 X-Authority-Analysis: v=2.2 cv=IOdyMknG c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=kj9zAlcOel0A:10 a=IgFoBzBjUZAA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=tgAb9Q3GBywBYEuO_zsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id D99151896; Fri, 6 Jan 2017 21:41:37 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id v075fbbv044042; Fri, 6 Jan 2017 21:41:37 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201701070541.v075fbbv044042@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r311568 - in head/sys: kern sys In-Reply-To: Message from John Baldwin of "Fri, 06 Jan 2017 23:41:45 +0000." <201701062341.v06NfjkL054505@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 06 Jan 2017 21:41:37 -0800 X-CMAE-Envelope: MS4wfGypuM1Ye1PCdukwZ319slfdIAYayPeXxHvqzmXoDMg9PdYiJ31bfxNS8c/7eGf7ZEiKbixyTENPe43EcT6UWgWekG0oyU3OQDjlDgKf9aaCxc8FB3Qu x7z4HFqGexXpQnZxUrThIZvylvYoa6vfx3qQymN1nAKDHoZEj3ZQT1BenHBzMicoEAjYEgAWOqdRr2nh9aBg/ivzRaPTf8g7U6e1VR4wQo96IF8SK6/Amr2r wh8H0fVhAjqXtBVYACNvQyA3yjiOhpStcFqTCNIDkhJ/6bijfjih9rL/q7ZBWs85 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2017 05:41:47 -0000 In message <201701062341.v06NfjkL054505@repo.freebsd.org>, John Baldwin writes: > Author: jhb > Date: Fri Jan 6 23:41:45 2017 > New Revision: 311568 > URL: https://svnweb.freebsd.org/changeset/base/311568 > > Log: > Set MORETOCOME for AIO write requests on a socket. > > Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend* > set PRUS_MOREOTOCOME when invoking the protocol send method. The aio > worker tasks for sending on a socket set this flag when there are > additional write jobs waiting on the socket buffer. > > Reviewed by: adrian > MFC after: 1 month > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D8955 > > Modified: > head/sys/kern/sys_socket.c > head/sys/kern/uipc_socket.c > head/sys/sys/socket.h > > Modified: head/sys/kern/sys_socket.c > ============================================================================= > = > --- head/sys/kern/sys_socket.c Fri Jan 6 23:30:54 2017 (r31156 > 7) > +++ head/sys/kern/sys_socket.c Fri Jan 6 23:41:45 2017 (r31156 > 8) > @@ -604,6 +604,8 @@ retry: > if (td->td_ru.ru_msgrcv != ru_before) > job->msgrcv = 1; > } else { > + if (!TAILQ_EMPTY(&sb->sb_aiojobq)) > + flags |= MSG_MORETOCOME; > uio.uio_rw = UIO_WRITE; > ru_before = td->td_ru.ru_msgsnd; > #ifdef MAC > > Modified: head/sys/kern/uipc_socket.c > ============================================================================= > = > --- head/sys/kern/uipc_socket.c Fri Jan 6 23:30:54 2017 (r31156 > 7) > +++ head/sys/kern/uipc_socket.c Fri Jan 6 23:41:45 2017 (r31156 > 8) > @@ -1182,6 +1182,7 @@ sosend_dgram(struct socket *so, struct s > (resid <= 0)) ? > PRUS_EOF : > /* If there is more to send set PRUS_MORETOCOME */ > + (flags & MSG_MORETOCOME) || > (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, > top, addr, control, td); > if (dontroute) { > @@ -1368,6 +1369,7 @@ restart: > (resid <= 0)) ? > PRUS_EOF : > /* If there is more to send set PRUS_MORETOCOME. */ > + (flags & MSG_MORETOCOME) || > (resid > 0 && space > 0) ? PRUS_MORETOCOME : 0, > top, addr, control, td); > if (dontroute) { > > Modified: head/sys/sys/socket.h > ============================================================================= > = > --- head/sys/sys/socket.h Fri Jan 6 23:30:54 2017 (r311567) > +++ head/sys/sys/socket.h Fri Jan 6 23:41:45 2017 (r311568) > @@ -435,6 +435,7 @@ struct msghdr { > #endif > #ifdef _KERNEL > #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks > - soreceive (TCP) */ > +#define MSG_MORETOCOME 0x20000 /* additional data pending */ This broke buildworld. It needs to be after the #endif below. > #endif > > /* > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.