Re: Areca driver recap + status

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

 



On Tue, 2006-06-27 at 08:32 +1000, Robert Mueller wrote:
> > - PAE (cast of dma_addr_t to unsigned long) issues.
> 
> Can you explain a bit what this is about and what the effect is? It's just 
> that we've been using the driver (older version from the areca website) in a 
> PAE kernel on machines with 8G of memory and haven't had a problem yet 
> (running high IO load for several weeks) but this sounds like it 
> might/should cause corruption or crashing in this situation?

It's these pieces:

+		pcmd->SCp.ptr = (char *)(unsigned long) dma_addr;


+	else if (pcmd->request_bufflen != 0)
+		pci_unmap_single(acb->pdev,
+			(dma_addr_t)(unsigned long)pcmd->SCp.ptr,
+			pcmd->request_bufflen, pcmd->sc_data_direction);

On a PAE platform, dma_addr_t is u64 and unsigned long is u32, so any
address > 4GB will be truncated by these operations.

I think all this does is cause a slow leak of dma mappings, and on any
kernel > 2.6.16 the leak should be even smaller, since we've severely
restricted the use_sg == 0 case.  It probably is only significant on
x86_64 with the gart iommu enabled.

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux