summaryrefslogtreecommitdiff
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-05 11:09:04 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-05 11:09:04 +0000
commitd477b56cac6c81b3c26380477da5f767bfc7cc7e (patch)
tree8d6a347fbe1602aeed5b39043708cda50901c247 /sys/kern/subr_disk.c
parent3afc301960a4fcf28a198f9f4d1d327a0837f83b (diff)
Remove lots of timer_state structs as they just ate memory and only a few was
ever used. Now a single state is kept for net, tty and disk events resp. Also, call the randomness from disk_unbusy instead of biodone, as biodone gets a lot of virtual events (from virtual filesystems etc), and as a bonus: feed xfer time and size into the entropy pool too.
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 960f4f6d715..6caec0043fe 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -56,6 +56,8 @@
#include <sys/dkio.h>
#include <sys/dkstat.h> /* XXX */
+#include <dev/rndvar.h>
+
/*
* A global list of all disks attached to the system. May grow or
* shrink over time.
@@ -390,6 +392,8 @@ disk_unbusy(diskp, bcount)
diskp->dk_xfer++;
}
diskp->dk_seek++;
+
+ add_disk_randomness(bcount ^ diff_time.tv_usec);
}
/*