summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src/diskdevs-init.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-05-31 10:27:29 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-06-04 09:54:31 +0200
commit39ee704e757268de833ffb956dda28f6aa2fa3a1 (patch)
tree3bfd4e6ebc6dc48d3751ad8445206409720d9abd /cpukit/libblock/src/diskdevs-init.c
parentbsps/powerpc: Add load section for .nocache (diff)
downloadrtems-39ee704e757268de833ffb956dda28f6aa2fa3a1.tar.bz2
libblock: Add read-ahead task
Read-ahead requests were previously executed in the context of the reading task. This blocks the reading task until the complete read with read-ahead transfer is finished. A read-ahead task is introduced to off-load the read-ahead transfer. This allows the reading task to work with the requested block more quickly. The read-ahead is triggered after two misses of ascending consecutive blocks or a read hit of a block read by the most-recent read-ahead transfer. The read-ahead feature is configurable and can be disabled.
Diffstat (limited to 'cpukit/libblock/src/diskdevs-init.c')
-rw-r--r--cpukit/libblock/src/diskdevs-init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libblock/src/diskdevs-init.c b/cpukit/libblock/src/diskdevs-init.c
index ccf954a49a..5ec96b250c 100644
--- a/cpukit/libblock/src/diskdevs-init.c
+++ b/cpukit/libblock/src/diskdevs-init.c
@@ -36,6 +36,7 @@ rtems_status_code rtems_disk_init_phys(
dd->media_block_size = block_size;
dd->ioctl = handler;
dd->driver_data = driver_data;
+ dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (block_count > 0) {
if ((*handler)(dd, RTEMS_BLKIO_CAPABILITIES, &dd->capabilities) != 0) {
@@ -67,6 +68,7 @@ rtems_status_code rtems_disk_init_log(
dd->media_block_size = phys_dd->media_block_size;
dd->ioctl = phys_dd->ioctl;
dd->driver_data = phys_dd->driver_data;
+ dd->read_ahead.trigger = RTEMS_DISK_READ_AHEAD_NO_TRIGGER;
if (phys_dd->phys_dev == phys_dd) {
rtems_blkdev_bnum phys_block_count = phys_dd->size;