Re: [PATCH] [6/21] Remove unchecked_isa_dma in advansys.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2008-11-16 at 23:33 +0100, Andi Kleen wrote:
> On Sun, Nov 16, 2008 at 11:56:21AM -0500, James Bottomley wrote:
> > > v2: use dma api for all allocations
> > 
> > Just a minute:  this is another driver where you allocate coherent
> > memory for the host structure but fail to use it for I/O as far as I can
> > tell.
> > 
> > What's going on here?  If this is just a ploy to get GFP_DMA memory,
> > then this isn't the way to do it.  Firstly, it doesn't seem to be needed
> 
> It's just that the structure was in GFP_DMA before due to unchecked_isa_dma
> so I wanted to do a equivalent convertion
> 
> > and secondly, coherent memory is hard (or impossible) to manufacture on
> > certain platforms.  You should only use it for DMA mailboxes and other
> > register exchanges between the device and main memory ... expanding its
> > use is asking for resource exhaustion.
> 
> It's not expanding it, in fact it lowers it because they allocate
> less in GFP_DMA now than with unchecked_isa_dma (e.g. no more commands
> and sense buffers)

but dma_alloc_coherent() isn't equivalent to an allocator with the
dma_mask on most platforms.  It is on x86 because that platform is fully
coherent, but on most others it's taking memory from a special coherent
pool.  This is the resource which can exhaust easily.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux