svn commit: r333466 - in head: contrib/bmake sys/conf sys/kern sys/modules/epoch_test sys/sys sys/tests/epoch

Bryan Drewery bdrewery at FreeBSD.org
Fri May 11 20:13:27 UTC 2018


On 5/10/2018 10:55 AM, Matt Macy wrote:
> Author: mmacy
> Date: Thu May 10 17:55:24 2018
> New Revision: 333466
> URL: https://svnweb.freebsd.org/changeset/base/333466
> 
> Log:
>   Add simple preempt safe epoch API
>   
>   Read locking is over used in the kernel to guarantee liveness. This API makes
>   it easy to provide livenes guarantees without atomics.
>   
>   Includes epoch_test kernel module to stress test the API.
>   
>   Documentation will follow initial use case.
>   
>   Test case and improvements to preemption handling in response to discussion
>   with mjg@
>   
>   Reviewed by:	imp@, shurd@
>   Approved by:	sbruno@
> 
> Added:
>   head/sys/kern/subr_epoch.c   (contents, props changed)
>   head/sys/modules/epoch_test/
>   head/sys/modules/epoch_test/Makefile   (contents, props changed)
>   head/sys/sys/epoch.h   (contents, props changed)
>   head/sys/tests/epoch/
>   head/sys/tests/epoch/epoch_test.c   (contents, props changed)
> Modified:
>   head/contrib/bmake/job.c
>   head/sys/conf/files
>   head/sys/conf/kern.pre.mk
>   head/sys/kern/kern_malloc.c
>   head/sys/kern/kern_synch.c
>   head/sys/kern/subr_trap.c
>   head/sys/kern/subr_turnstile.c
>   head/sys/sys/proc.h
>   head/sys/sys/turnstile.h
> 
> Modified: head/contrib/bmake/job.c
> ==============================================================================
> --- head/contrib/bmake/job.c	Thu May 10 17:22:04 2018	(r333465)
> +++ head/contrib/bmake/job.c	Thu May 10 17:55:24 2018	(r333466)
> @@ -2121,13 +2121,15 @@ Job_CatchOutput(void)
>  {
>      int nready;
>      Job *job;
> -    int i;
> +    int i, pollToken;
>  
>      (void)fflush(stdout);
>  
> +	pollToken = 0;
> +
>      /* The first fd in the list is the job token pipe */
>      do {
> -	nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC);
> +	nready = poll(fds + 1 - pollToken, nfds - 1 + pollToken, POLL_MSEC);
>      } while (nready < 0 && errno == EINTR);
>  
>      if (nready < 0)

What's up with this?

-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20180511/c565d7cf/attachment.sig>


More information about the svn-src-head mailing list