From owner-svn-src-all@freebsd.org Mon Nov 23 03:22:58 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 988C5A35724; Mon, 23 Nov 2015 03:22:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pa0-x22b.google.com (mail-pa0-x22b.google.com [IPv6:2607:f8b0:400e:c03::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 6ED94175E; Mon, 23 Nov 2015 03:22:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by pabfh17 with SMTP id fh17so182373093pab.0; Sun, 22 Nov 2015 19:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wYJNt7NdMGb3KqKsr+ebDQ4WYas68J2UPw0ku3RYBys=; b=b0hLQuyBLhwW/QRbWIQ0S4coGvTHQz8ibZ8zQE6EQh/JEwFYLtnH6AbZZU90dpE2cm JGSQ7krmBol6HFOQZD0C7FGfvhF7UEbT39W796jwP8aaDTLlFdgCL1o6Tl5AdB4yIKUS vWxNDxz22pzRha68GS0mtPeVUNMAA6tvqplFjXEjdp6QxChA1CootG/+VS7mvZIzIRxW mG48tm7JRdiR6W7x0Tp8ru39qlQhFiIoPJaXgPJwXCB28YtSCXlOpSAmabMzDfHTaFIQ vhky7u3eVRjWL5nijYdWLV7i2D05bm4WxKxqht/fvNvAWKNuNOnnNbhW/jL6a0xFJSTI LDoA== X-Received: by 10.98.67.68 with SMTP id q65mr13344019pfa.63.1448248977985; Sun, 22 Nov 2015 19:22:57 -0800 (PST) Received: from raichu ([104.232.114.184]) by smtp.gmail.com with ESMTPSA id ef5sm8139468pbc.46.2015.11.22.19.22.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Nov 2015 19:22:57 -0800 (PST) Sender: Mark Johnston Date: Sun, 22 Nov 2015 19:22:53 -0800 From: Mark Johnston To: Svatopluk Kraus Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291142 - in head/sys: arm/arm arm64/arm64 mips/mips powerpc/powerpc x86/x86 Message-ID: <20151123032253.GA2084@raichu> References: <201511211955.tALJt18a052565@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511211955.tALJt18a052565@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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: Mon, 23 Nov 2015 03:22:58 -0000 On Sat, Nov 21, 2015 at 07:55:01PM +0000, Svatopluk Kraus wrote: > Author: skra > Date: Sat Nov 21 19:55:01 2015 > New Revision: 291142 > URL: https://svnweb.freebsd.org/changeset/base/291142 > > Log: > Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being > created for bus_dma_tag_t tag, bounce pages should be allocated > only if needed. > > Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag > was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed, > it could cause memory exhaustion when a lot of such tags together with > their maps were created. > > Note that there could be more maps in one tag by current design. > However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after > bounce pages are allocated. Thus, they are allocated only for first > tag's map which needs them. This appears to cause a hang with one of the re(4) interfaces in my workstation. I can use it to start an ssh session, but it quickly hits a point where it stops transmitting or receiving packets, and I need to reboot the system to recover. Interestingly, the other re(4) interface in this system works fine, but it drives a different card: working: re0@pci0:3:0:0: class=0x020000 card=0x85051043 chip=0x816810ec rev=0x09 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller' class = network subclass = ethernet non-working: re1@pci0:5:0:0: class=0x020000 card=0x816910ec chip=0x816910ec rev=0x10 hdr=0x00 vendor = 'Realtek Semiconductor Co., Ltd.' device = 'RTL8169 PCI Gigabit Ethernet Controller' class = network subclass = ethernet