From owner-freebsd-hackers@freebsd.org Mon Nov 28 16:03:19 2016 Return-Path: Delivered-To: freebsd-hackers@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 8176EC5A72A for ; Mon, 28 Nov 2016 16:03:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0078F15C6 for ; Mon, 28 Nov 2016 16:03:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id uASG3BwN057635 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 28 Nov 2016 18:03:12 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua uASG3BwN057635 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id uASG3BbX057634; Mon, 28 Nov 2016 18:03:11 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 28 Nov 2016 18:03:11 +0200 From: Konstantin Belousov To: Fabian Keil Cc: David Cross , freebsd-hackers@freebsd.org Subject: Re: FreeBSD 11 i386 disk deadlock (I think) (now with reproduction steps!) Message-ID: <20161128160311.GQ54029@kib.kiev.ua> References: <20161128041847.GA65249@charmander> <20161128120046.GP54029@kib.kiev.ua> <20161128144135.10f93205@fabiankeil.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128144135.10f93205@fabiankeil.de> User-Agent: Mutt/1.7.1 (2016-10-04) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 16:03:19 -0000 On Mon, Nov 28, 2016 at 02:43:30PM +0100, Fabian Keil wrote: > David Cross wrote: > > > This is certainly new behavior, or a new manifestation. > > Recently a couple of uma consumers were changed to share uma zones > instead of using a dedicated zone. As a result geli competes with > more uma consumers and is more likely to deadlock. The bug isn't > new, it's just triggered more often now. The problem happens on layer much lower than UMA, it is whole reusable page pool which is depleted and cannot be re-filled without allocating more memory. If you think about it, the deadlock is obviously trivial: pagedaemon is the main source of the free pages, but if producing free page requires allocating one, low memory condition is equal to deadlock. It was always there, in the sense that for all versions of freebsd, if file/disk write path requires memory allocation, there is the trouble. For geom, some special unique measures were taken so that bio allocations do not cause the issue in typical situations. > > geli isn't the only uma consumer that is affected: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209680