svn commit: r320153 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

O. Hartmann ohartmann at walstatt.org
Tue Jun 20 18:55:13 UTC 2017


Am Tue, 20 Jun 2017 16:55:30 +0000 (UTC)
Andriy Gapon <avg at FreeBSD.org> schrieb:

> Author: avg
> Date: Tue Jun 20 16:55:30 2017
> New Revision: 320153
> URL: https://svnweb.freebsd.org/changeset/base/320153
> 
> Log:
>   revert r315852 which introduced zio_buf_alloc_nowait for use in vdev_queue_aggregate
>   
>   I think that the change is still good, but reconciling it with a planned
>   merge of the ARC buf data scatter-ization is a bit more tedious
>   than I can handle.
>   
>   MFC after:	17 days
> 
> Modified:
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Tue Jun 20
> 16:45:48 2017	(r320152) +++
> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Tue Jun 20
> 16:55:30 2017	(r320153) @@ -555,7 +555,6 @@ extern zio_t
> *zio_unique_parent(zio_t *cio); extern void zio_add_child(zio_t *pio, zio_t *cio); 
>  extern void *zio_buf_alloc(size_t size);
> -extern void *zio_buf_alloc_nowait(size_t size);
>  extern void zio_buf_free(void *buf, size_t size);
>  extern void *zio_data_buf_alloc(size_t size);
>  extern void zio_data_buf_free(void *buf, size_t size);
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c	Tue Jun 20
> 16:45:48 2017	(r320152) +++
> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c	Tue Jun 20
> 16:55:30 2017	(r320153) @@ -647,7 +647,6 @@ static zio_t *
> vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) {
>  	zio_t *first, *last, *aio, *dio, *mandatory, *nio;
> -	void *abuf;
>  	uint64_t maxgap = 0;
>  	uint64_t size;
>  	boolean_t stretch;
> @@ -766,12 +765,8 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
>  	size = IO_SPAN(first, last);
>  	ASSERT3U(size, <=, SPA_MAXBLOCKSIZE);
>  
> -	abuf = zio_buf_alloc_nowait(size);
> -	if (abuf == NULL)
> -		return (NULL);
> -
>  	aio = zio_vdev_delegated_io(first->io_vd, first->io_offset,
> -	    abuf, size, first->io_type, zio->io_priority,
> +	    zio_buf_alloc(size), size, first->io_type, zio->io_priority,
>  	    flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE,
>  	    vdev_queue_agg_io_done, NULL);
>  	aio->io_timestamp = first->io_timestamp;
> 
> Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
> ==============================================================================
> --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Tue Jun 20
> 16:45:48 2017	(r320152) +++
> head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Tue Jun 20 16:55:30
> 2017	(r320153) @@ -272,33 +272,18 @@ zio_fini(void)
>   * useful to inspect ZFS metadata, but if possible, we should avoid keeping
>   * excess / transient data in-core during a crashdump.
>   */
> -static void *
> -zio_buf_alloc_impl(size_t size, boolean_t canwait)
> +void *
> +zio_buf_alloc(size_t size)
>  {
>  	size_t c = (size - 1) >> SPA_MINBLOCKSHIFT;
>  	int flags = zio_exclude_metadata ? KM_NODEBUG : 0;
>  
>  	VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT);
>  
> -	if (zio_use_uma) {
> -		return (kmem_cache_alloc(zio_buf_cache[c],
> -		    canwait ? KM_PUSHPAGE : KM_NOSLEEP));
> -	} else {
> -		return (kmem_alloc(size,
> -		    (canwait ? KM_SLEEP : KM_NOSLEEP) | flags));
> -	}
> -}
> -
> -void *
> -zio_buf_alloc(size_t size)
> -{
> -	return (zio_buf_alloc_impl(size, B_TRUE));
> -}
> -
> -void *
> -zio_buf_alloc_nowait(size_t size)
> -{
> -	return (zio_buf_alloc_impl(size, B_FALSE));
> +	if (zio_use_uma)
> +		return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE));
> +	else
> +		return (kmem_alloc(size, KM_SLEEP|flags));
>  }
>  
>  /*
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"

Running r320138, which is stable for me, My systems crash immediately when booting with
r320158. Since I use ZFS compiled into the kernel and it seems to be the only change so
far of importance involving the kernel, I suspect the ZFS changes to be the source of the
crash.

At the moment, I have no debugging kernel running, so this guess is more out of the blue.

Kind regards,
Oliver

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 313 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20170620/33f9de70/attachment.sig>


More information about the svn-src-head mailing list