Changeset 71092f7 in rtems


Ignore:
Timestamp:
Jul 2, 2012, 2:58:01 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
2cc4f3c, d2bb25ae
Parents:
c8a86d4d
git-author:
Sebastian Huber <sebastian.huber@…> (07/02/12 14:58:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/02/12 15:03:28)
Message:

libblock: Fix read-ahead trigger and next update

The previous version was sub-optimal for read-ahead transfer counts of
one.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    rc8a86d4d r71092f7  
    30283028          {
    30293029            transfer_count = max_transfer_count;
    3030             dd->read_ahead.trigger = block + (transfer_count + 1) / 2;
     3030            dd->read_ahead.trigger = block + transfer_count / 2;
    30313031            dd->read_ahead.next = block + transfer_count;
    30323032          }
  • testsuites/libtests/block13/init.c

    rc8a86d4d r71092f7  
    4343  7, 8,
    4444  RESET_CACHE,
    45   6, 7, 10
     45  6, 7, 9
    4646};
    4747
     
    5151   { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
    5252   { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
    53    { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
    5453   { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
    5554   { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
     
    5958   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    6059   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
     60   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
    6161   UNUSED_LINE,
    6262   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
     
    7979
    8080static const rtems_blkdev_bnum trigger [READ_COUNT] = {
    81   1, 3, 6, 6, 6, 9, 9, 9, NO_TRIGGER, NO_TRIGGER,
     81  1, 3, 5, 5, 8, 8, 8, NO_TRIGGER, NO_TRIGGER, NO_TRIGGER,
    8282  TRIGGER_AFTER_RESET,
    8383  11,
     
    8989  8, NO_TRIGGER,
    9090  TRIGGER_AFTER_RESET,
    91   7, 10, NO_TRIGGER
     91  7, 9, NO_TRIGGER
    9292};
    9393
     
    9595
    9696static const rtems_blkdev_bnum next [READ_COUNT] = {
    97   2, 4, 7, 7, 7, 10, 10, 10, 10, 10,
     97  2, 4, 7, 7, 10, 10, 10, 10, 10, 10,
    9898  NOT_CHANGED_BY_RESET(10),
    9999  12,
Note: See TracChangeset for help on using the changeset viewer.