Really slow /dev/zero in 2.1.9

Jeff Voskamp [MFCF] (
Wed, 13 Nov 1996 09:53:00 -0500 (EST)

I just tried making a new swapfile today (needed a bit more swap for
my latest project). It took "forever" to dd /dev/zero to the swapfile.

So I took a look at drivers/char/mem.c. Down around line 200 is a for
loop that's filling the user buffer _one byte at a time_ and checking
if we need rescheduling between each byte. It should probably be using
clear_user(), but I'm unsure if it's safe to do it in one big whack.


Jeff Voskamp