Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751446AbWCLFtJ (ORCPT ); Sun, 12 Mar 2006 00:49:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751436AbWCLFtJ (ORCPT ); Sun, 12 Mar 2006 00:49:09 -0500 Received: from noname.neutralserver.com ([70.84.186.210]:36314 "EHLO noname.neutralserver.com") by vger.kernel.org with ESMTP id S1751195AbWCLFtH (ORCPT ); Sun, 12 Mar 2006 00:49:07 -0500 Date: Sun, 12 Mar 2006 07:49:31 +0200 From: Dan Aloni To: Jeff Garzik Cc: Linux Kernel List , "linux-ide@vger.kernel.org" Subject: Re: [PATCH] sata_mv: stabilize for 5081 and other fixes Message-ID: <20060312054931.GA23943@localdomain> References: <20060308194627.GA22346@localdomain> <44137D39.3000704@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44137D39.3000704@pobox.com> User-Agent: Mutt/1.5.11+cvs20060126 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - noname.neutralserver.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - monatomic.org X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1403 Lines: 33 On Sat, Mar 11, 2006 at 08:45:29PM -0500, Jeff Garzik wrote: > > This is adding a bug. > > The IOMMU worst case requires a split for each s/g entry, due to DMA > boundary issues. See mv_fill_sg() or ata_fill_sg(). > > Thus, the above "/ 2" is required. Okay I figured it out - here we are using the SCSI sg driver, and a scatter-gatter entry generated by that driver will never cross a page boundery (nor a DMA boundary), because each userspace page is mapped into one scatter-gatter entry, so in that case the "/ 2" isn't needed. Coming to think about it, that's only valid on x86 and x86_64. Are there other architectures that break that assumption? I'd still want to be able to read/write 1MB at a time, otherwise it would require massive userspace code rewrites in our application, (limiting it to 0.5MB). Do you have any suggestions about how to do that? I mean, it is not trivial to pass 128 entries of 2*PAGE_SIZE based on userspace memory. p.s. I thought scatter-gatter entries are only valid for the page they point to, it's good to learn new things :) -- Dan Aloni da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il - 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/