Re: Does pci_alloc_consisent really need to zero memory?

David S. Miller (davem@redhat.com)
Thu, 30 May 2002 02:49:59 -0700 (PDT)


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/