Re: Does pci_alloc_consisent really need to zero memory?

From: David S. Miller (davem@redhat.com)
Date: Thu May 30 2002 - 04:49:59 EST


   From: "Adam J. Richter" <adam@yggdrasil.com>
   Date: Thu, 30 May 2002 02:11:12 -0700

           Is it really necessary for pci_alloc_consistent() to
   fill the memory that it returns with all zeroes? I don't
   see anything in Documentation/DMA-mapping.txt that specifies
   it. I have been on the lookout for drivers that rely on it
   for the past couple of months, and I haven't seen any. It's
   only one line of code in arch/i386/kernel/pci-dma.c, but it
   is potentially a lot of cycles, even if only zeroes the
   space you requested (rather than the full pages that it
   actually allocates).

pci_alloc_consistent is so rare, I doubt it matters performance
wise.

I'd rather see a patch to DMA-mapping.txt that specifies the memory
returned is zeroed out, as this is what every implementation appears
to do.
-
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/



This archive was generated by hypermail 2b29 : Fri May 31 2002 - 22:00:28 EST