Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Jan 2017 21:41:37 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        John Baldwin <jhb@FreeBSD.org>
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
Message-ID:  <201701070541.v075fbbv044042@slippy.cwsent.com>
In-Reply-To: Message from John Baldwin <jhb@FreeBSD.org> of "Fri, 06 Jan 2017 23:41:45 %2B0000." <201701062341.v06NfjkL054505@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070541.v075fbbv044042>