Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2015 14:06:06 +0200
From:      Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@FreeBSD.org>
To:        Warner Losh <imp@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r287405 - head/sys/geom
Message-ID:  <20150903120606.GB75381@brick.home>
In-Reply-To: <201509021729.t82HTULW036119@repo.freebsd.org>
References:  <201509021729.t82HTULW036119@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 0902T1729, Warner Losh wrote:
> Author: imp
> Date: Wed Sep  2 17:29:30 2015
> New Revision: 287405
> URL: https://svnweb.freebsd.org/changeset/base/287405
> 
> Log:
>   After the introduction of direct dispatch, the pacing code in g_down()
>   broke in two ways. One, the pacing variable was accessed in multiple
>   threads in an unsafe way. Two, since large numbers of I/O could come
>   down from the buf layer at one time, large numbers of allocation
>   failures could happen all at once, resulting in a huge pace value that
>   would limit I/Os to 10 IOPS for minutes (or even hours) at a
>   time. While a real solution to these problems requires substantial
>   work (to go to a no-allocation after the first model, or to have some
>   way to wait for more memory with some kind of reserve for pager and
>   swapper requests), it is relatively easy to make this simplistic
>   pacing less pathological.

Shouldn't we emit some warning the first time this happens, to aid
in debugging strange IO performance degradation?  Something like...

> @@ -688,7 +699,7 @@ g_io_deliver(struct bio *bp, int error)
>  	bp->bio_driver2 = NULL;
>  	bp->bio_pflags = 0;
>  	g_io_request(bp, cp);

	if (warned_about_pace == 0) {
		printf("WARNING: GEOM io allocation failed; expect reduced IO performance\n");
		warned_about_pace = 1;
	}

> -	pace++;
> +	pace = 1;
>  	return;
>  }




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