Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754738AbbDPSnU (ORCPT ); Thu, 16 Apr 2015 14:43:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44517 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752202AbbDPSnM (ORCPT ); Thu, 16 Apr 2015 14:43:12 -0400 Date: Thu, 16 Apr 2015 14:42:52 -0400 From: Konrad Rzeszutek Wilk To: Dorian Gray Cc: Alexander Duyck , Alan Stern , Suman Tripathi , iommu@lists.linux-foundation.org, USB list , Kernel development list Subject: Re: Error: DMA: Out of SW-IOMMU space [was: External USB drives become unresponsive after few hours.] Message-ID: <20150416184252.GE7388@x230.dumpdata.com> References: <552FCD25.9060807@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4160 Lines: 138 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 16, 2015 at 06:57:46PM +0200, Dorian Gray wrote: > On 16 April 2015 at 16:15, Alan Stern wrote: > > This appears to be a problem with the IOMMU or SWIOTLB subsystems, not > > the USB subsystem. I have CC'ed the appropriate mailing lists. > > Thanks, I'm far from being a kernel expert, so was expecting it could > be wrong subsection. > > > > On 16 April 2015 at 16:24, Suman Tripathi wrote: > > Try increasing the SWIOTLB size to 128MB .Default is 64MB. > > Ok, so I'm back to k3.18.7 (default in the latest Fatdog), although > I'm not sure what should be the exact value of swiotlb boot param? > Got totally mixed results from uncle Google - some says the unit is in > MiB, some that it's 4k pages and another that 128MiB = 65536, so I > played it safe and used swiotlb=131072. > Is this correct? > It may take a few days, but I'll let you know if it worked (or for how > long, if not). > > > > On 16 April 2015 at 16:54, Alexander Duyck wrote: > > More likely would be a device driver that is DMA mapping memory but not > > unmapping it after it is done resulting in the bounce buffer pool being > > depleted. > > You might want dump the list of drivers loaded on the system with lsmod, > > and then possibly look at doing a git bisect for something introduced > > between 3.17 and 3.18 since that seems to be when you started seeing > > this issue. > > Ok, I'll (try to) look at this, but like I said - I'm not a kernel > (nor git) expert. > Anyway, I guess I'm gonna start with this: > https://wiki.gentoo.org/wiki/Kernel_git-bisect > Who knows...perhaps I'll find something... And easier way is to compile the kernel with CONFIG_DMA_API_DEBUG and then load the attached module. That should tell you who and what else is holding on the buffers. > > > > Thank you all for the replies. > Jake > _______________________________________________ > iommu mailing list > iommu@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dump_dma.c" /* * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2.0 as published by * the Free Software Foundation * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define DUMP_DMA_FUN "0.1" MODULE_AUTHOR("Konrad Rzeszutek Wilk "); MODULE_DESCRIPTION("dump dma"); MODULE_LICENSE("GPL"); MODULE_VERSION(DUMP_DMA_FUN); static int __init dump_dma_init(void) { debug_dma_dump_mappings(NULL); return 0; } static void __exit dump_dma_exit(void) { } module_init(dump_dma_init); module_exit(dump_dma_exit); --BOKacYhQ+x31HxR3-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/