From owner-freebsd-current@FreeBSD.ORG Thu Apr 16 22:04:49 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01004106566B for ; Thu, 16 Apr 2009 22:04:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C72198FC1D for ; Thu, 16 Apr 2009 22:04:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 7ABE446B03; Thu, 16 Apr 2009 18:04:48 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 7B20D8A01A; Thu, 16 Apr 2009 18:04:47 -0400 (EDT) From: John Baldwin To: Scott Long Date: Thu, 16 Apr 2009 18:04:41 -0400 User-Agent: KMail/1.9.7 References: <49BD117B.2080706@163.com> <200904161748.08402.jhb@freebsd.org> <49E7A8DF.9080902@samsco.org> In-Reply-To: <49E7A8DF.9080902@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904161804.42399.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 16 Apr 2009 18:04:47 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=4.2 tests=RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Damian Gerow , freebsd-current@freebsd.org, Richard Todd Subject: Re: ZFS checksum errors on umass(4) insertion X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2009 22:04:49 -0000 On Thursday 16 April 2009 5:53:35 pm Scott Long wrote: > John Baldwin wrote: > > On Thursday 16 April 2009 5:32:52 pm Scott Long wrote: > >> John Baldwin wrote: > >>> Can you please try http://www.FreeBSD.org/~jhb/patches/dma_pg.patch? This > >>> lines up with your analysis in that it fixes a problem in the bounce > > buffer > >>> code that was introduced with the new USB stack (and only triggers when > > the > >>> USB code has to use a bounce buffer). > >>> > >> As a data point, most normal I/O is not going to trigger this bug, even > >> if it gets bounced. I/O using O_DIRECT can, and GEOM discovery I/O can > >> as well. Since memory is allocated from the top of the system, I think > >> that the damage gets done early during boot, and then propagates out > >> over time as the system becomes busier. > > > > Hmm, are you sure regular I/O won't trigger it as well? All it takes is for > > any USB transfer that starts off within a page to get a page into a non-zero > > offset and later have a request >= PAGE_SIZE bounce. Since the VM is going > > to always ask for I/O to pages (e.g. GET/PUTPAGES) normal disk I/O would > > break if it uses the bad bounce page I think. > > > > Sorry, I knew what I meant but didn't say it that well. Once it gets > triggered, it poisons that bounce page from thereon out, and any I/O > will be affected. But the only I/O that will typically trigger it is > GEOM scanning and O_DIRECT. Ah, ok. Actually, couldn't any USB request trigger it (so long as the source buffer isn't page aligned?) E.g. if you malloc()'d a 16-byte buffer and used it to receive some descriptor for the keyboard driver and malloc() used a backing page > 4GB, wouldn't that bounce and end up breaking a bounce page? -- John Baldwin