Messages in this thread | | | Date | Wed, 2 Feb 2005 22:06:20 -0500 (EST) | From | Rik van Riel <> | Subject | Re: A scrub daemon (prezeroing) |
| |
On Wed, 2 Feb 2005, Marcelo Tosatti wrote:
> Someone should try implementing the zeroing driver for a fast x86 PCI > device. :)
I'm not convinced. Zeroing a page takes 2000-4000 CPU cycles, while faulting the page from RAM into cache takes 200-400 CPU cycles per cache line, or 6000-12000 CPU cycles.
If the page is being used immediately after it is allocated, it may be faster to prezero the page on the fly. On some CPUs these writes bypass the "read from RAM" stage and allow things to just live in cache completely.
-- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan - 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/
| |