Re: skge/sk98lin slowdown with 4 Gb memory compared to 2 Gb memory

From: Stephen Hemminger
Date: Fri Mar 10 2006 - 16:26:03 EST


I suspect the optimization (in other drivers as well) that doesn't set 64 bit mask
unless dma addresses are 64 bit. The problem would go away if you config for 64G of
memory.

This unconditionally sets 64 bit mask, does it change the situation?

--- linux-2.6.orig/drivers/net/skge.c 2006-03-10 13:26:29.000000000 -0800
+++ linux-2.6/drivers/net/skge.c 2006-03-10 13:12:38.000000000 -0800
@@ -3265,16 +3265,10 @@

pci_set_master(pdev);

- if (sizeof(dma_addr_t) > sizeof(u32) &&
- !(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) {
+ if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK) &&
+ !pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
using_dac = 1;
- err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
- if (err < 0) {
- printk(KERN_ERR PFX "%s unable to obtain 64 bit DMA "
- "for consistent allocations\n", pci_name(pdev));
- goto err_out_free_regions;
- }
- } else {
+ else {
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
if (err) {
printk(KERN_ERR PFX "%s no usable DMA configuration\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/