diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-04-09 21:29:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-04-09 21:29:32 -0700 |
| commit | 8fa498462272fec2c16a92a9a7f67d005225b640 (patch) | |
| tree | e29b46a5009e785a91243ef5d9905c23557b8375 /include/linux/raid | |
| parent | 3d30a6cc3af49ca0b668a2cbbc9d43def619567c (diff) | |
[PATCH] readahead
I'd like to be able to claim amazing speedups, but
the best benchmark I could find was diffing two
256 megabyte files, which is about 10% quicker. And
that is probably due to the window size being effectively
50% larger.
Fact is, any disk worth owning nowadays has a segmented
2-megabyte cache, and OS-level readahead mainly seems
to save on CPU cycles rather than overall throughput.
Once you start reading more streams than there are segments
in the disk cache we start to win.
Still. The main motivation for this work is to
clean the code up, and to create a central point at
which many pages are marshalled together so that
they can all be encapsulated into the smallest possible
number of BIOs, and injected into the request layer.
A number of filesystems were poking around inside the
readahead state variables. I'm not really sure what they
were up to, but I took all that out. The readahead
code manages its own state autonomously and should not
need any hints.
- Unifies the current three readahead functions (mmap reads, read(2)
and sys_readhead) into a single implementation.
- More aggressive in building up the readahead windows.
- More conservative in tearing them down.
- Special start-of-file heuristics.
- Preallocates the readahead pages, to avoid the (never demonstrated,
but potentially catastrophic) scenario where allocation of readahead
pages causes the allocator to perform VM writeout.
- Gets all the readahead pages gathered together in
one spot, so they can be marshalled into big BIOs.
- reinstates the readahead ioctls, so hdparm(8) and blockdev(8)
are working again. The readahead settings are now per-request-queue,
and the drivers never have to know about it. I use blockdev(8).
It works in units of 512 bytes.
- Identifies readahead thrashing.
Also attempts to handle it. Certainly the changes here
delay the onset of catastrophic readahead thrashing by
quite a lot, and decrease it seriousness as we get more
deeply into it, but it's still pretty bad.
Diffstat (limited to 'include/linux/raid')
| -rw-r--r-- | include/linux/raid/md_k.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index c0c21e26f2c3..997d45fa7be7 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -91,7 +91,6 @@ static inline mddev_t * kdev_to_mddev (kdev_t dev) /* * default readahead */ -#define MD_READAHEAD MAX_READAHEAD static inline int disk_faulty(mdp_disk_t * d) { |
