Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jun 2015 06:07:15 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Sean Bruno <sbruno@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r284535 - head/sys/kern
Message-ID:  <20150618030715.GD2080@kib.kiev.ua>
In-Reply-To: <201506180204.t5I24LJm079537@svn.freebsd.org>
References:  <201506180204.t5I24LJm079537@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 18, 2015 at 02:04:21AM +0000, Sean Bruno wrote:
> Author: sbruno
> Date: Thu Jun 18 02:04:20 2015
> New Revision: 284535
> URL: https://svnweb.freebsd.org/changeset/base/284535
> 
> Log:
>   This change replaces the mutex with a sx lock for the interpreter list to
>   avoid the problem of holding a non-sleep lock during a page fault as
>   reported by witness. It also uses atomics where possible to avoid having
>   to acquire the exclusive lock. In addition, it consistently uses
>   memset()/memcpy() instead of bzero()/bcopy().
>   
>   Differential Revision:	https://reviews.freebsd.org/D1971
>   Submitted by:	sson
>   Reviewed by:	jhb
What are the page faults during image activator run ?
Or, if the page faults are not during image activation, then where ?

> 
> @@ -404,12 +404,12 @@ imgact_binmisc_get_all_entries(struct sy
>  	imgact_binmisc_entry_t *ibe;
>  	int error = 0, count;
>  
> -	mtx_lock(&interp_list_mtx);
> +	sx_slock(&interp_list_sx);
>  	count = interp_list_entry_count;
>  	/* Don't block in malloc() while holding lock. */
>  	xbe = malloc(sizeof(*xbe) * count, M_BINMISC, M_NOWAIT|M_ZERO);
This is definitely no longer true statement.
Even the original use of M_NOWAIT there is not warranted.


>  	if (!xbe) {
> -		mtx_unlock(&interp_list_mtx);
> +		sx_sunlock(&interp_list_sx);
>  		return (ENOMEM);
>  	}
>  



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