From owner-svn-src-all@freebsd.org Thu Sep 3 12:06:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 184879C9E08; Thu, 3 Sep 2015 12:06:12 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B28A414E9; Thu, 3 Sep 2015 12:06:11 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by wicfx3 with SMTP id fx3so17521634wic.1; Thu, 03 Sep 2015 05:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=PLU4qn9R42yiC2PH91yOFJlNmRCa9qg2aGYnxeiCe2A=; b=kBnlo/RbYGLdTJHDfF8laO50wbbeg+R+hwC1DQywzYj6dDZS6rRxHdw+CzBQnkAxx4 Bqm+NG8JhOWKUlqCDfVHKmkjUowTupPyygGIn0VVJ+CBCBLrWWKQj4+Po2fc5il45/4O aMSf+rkkQIQ2dpr9DyLhWBw+c35DFNQ88P74u910s9G7oSfjEUPl+rKqH0o0c2wXYXGd cqwdgZQlhNajtWGDzNsLGZKjTd62QR0yGDJaczuOGPTQbn73ZGJm/OhHvrZItUQv08OU yUdNFCCAjZFvE5+nBWnzqNX4lH+iACYofThxwupijf1UhMmdT9Xmk48d29lslCZhdmUS bOsA== X-Received: by 10.194.205.68 with SMTP id le4mr20500959wjc.74.1441281970004; Thu, 03 Sep 2015 05:06:10 -0700 (PDT) Received: from brick.home (euj88.neoplus.adsl.tpnet.pl. [83.20.181.88]) by smtp.gmail.com with ESMTPSA id y15sm8700369wib.7.2015.09.03.05.06.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 05:06:09 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 3 Sep 2015 14:06:06 +0200 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Warner Losh 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> Mail-Followup-To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201509021729.t82HTULW036119@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201509021729.t82HTULW036119@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 12:06:12 -0000 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; > }