Changeset 1fb0e2d in rtems


Ignore:
Timestamp:
Jul 2, 2012, 2:17:48 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Children:
75ba62e
Parents:
90b301c (diff), f29d969 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'upstream'

Files:
4 added
6 edited

Legend:

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

    r90b301c r1fb0e2d  
    6262  bool                  syncing;     /**< The data is a sync'ing. */
    6363  rtems_blkdev_request* write_req;   /**< The write request array. */
    64   uint32_t              bufs_per_bd; /**< Number of buffers per bd. */
    6564} rtems_bdbuf_swapout_transfer;
    6665
     
    22982297    uint32_t last_block = 0;
    22992298
    2300     /*
    2301      * Number of buffers per bd. This is used to detect the next
    2302      * block.
    2303      */
    2304     uint32_t bufs_per_bd = 0;
    2305 
    23062299    rtems_disk_device *dd = transfer->dd;
    2307 
    2308     bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
     2300    uint32_t media_blocks_per_block = dd->media_blocks_per_block;
     2301    bool need_continuous_blocks =
     2302      (dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
    23092303
    23102304    /*
     
    23352329        printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
    23362330                bd->block, transfer->write_req->bufnum,
    2337                 dd->phys_dev->capabilities &
    2338                 RTEMS_BLKDEV_CAP_MULTISECTOR_CONT ? "MULIT" : "SCAT");
    2339 
    2340       if ((dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) &&
    2341           transfer->write_req->bufnum &&
    2342           (bd->block != (last_block + bufs_per_bd)))
     2331                need_continuous_blocks ? "MULTI" : "SCAT");
     2332
     2333      if (need_continuous_blocks && transfer->write_req->bufnum &&
     2334          bd->block != last_block + media_blocks_per_block)
    23432335      {
    23442336        rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
     
    30363028          {
    30373029            transfer_count = max_transfer_count;
    3038             dd->read_ahead.trigger += max_transfer_count / 2 + 1;
    3039             dd->read_ahead.next += max_transfer_count;
     3030            dd->read_ahead.trigger = block + (transfer_count + 1) / 2;
     3031            dd->read_ahead.next = block + transfer_count;
    30403032          }
    30413033          else
  • testsuites/libtests/Makefile.am

    r90b301c r1fb0e2d  
    22
    33SUBDIRS = POSIX
     4SUBDIRS += block15
    45SUBDIRS += block14
    56SUBDIRS += block13
  • testsuites/libtests/block06/init.c

    r90b301c r1fb0e2d  
    18451845#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
    18461846
     1847#define CONFIGURE_BDBUF_TASK_STACK_SIZE BDBUF_TEST_STACK_SIZE
     1848
    18471849#define CONFIGURE_MAXIMUM_TASKS (1 + BDBUF_TEST_TASKS)
    18481850#define CONFIGURE_MAXIMUM_DRIVERS 3
  • testsuites/libtests/block13/block13.scn

    r90b301c r1fb0e2d  
    11*** TEST BLOCK 13 ***
    2 0 2 3 4 5 6 7 8
     20 2 3 4 5 6 7 8 9 10
     3reset
     410
     5reset
     69
    37reset
    488
    59reset
    6 7
     107 8
    711reset
    8 6 7
    9 reset
    10 5 6 8
     126 7 10
    1113*** END OF TEST BLOCK 13 ***
  • testsuites/libtests/block13/init.c

    r90b301c r1fb0e2d  
    2525#include <rtems/bdbuf.h>
    2626
    27 #define BLOCK_COUNT 9
    28 #define READ_COUNT 19
     27#define BLOCK_COUNT 11
     28#define READ_COUNT 23
    2929
    3030static int block_access_counts [BLOCK_COUNT];
     
    3333
    3434static const int action_sequence [READ_COUNT] = {
    35   0, 2, 3, 4, 5, 6, 7, 8,
     35  0, 2, 3, 4, 5, 6, 7, 8, 9, 10,
     36  RESET_CACHE,
     37  10,
     38  RESET_CACHE,
     39  9,
    3640  RESET_CACHE,
    3741  8,
    3842  RESET_CACHE,
    39   7,
    40   RESET_CACHE,
    41   6, 7,
    42   RESET_CACHE,
    43   5, 6, 8
    44 };
    45 
    46 #define UNUSED_LINE { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
     43  7, 8,
     44  RESET_CACHE,
     45  6, 7, 10
     46};
     47
     48#define UNUSED_LINE { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
    4749
    4850static const int expected_block_access_counts [READ_COUNT] [BLOCK_COUNT] = {
    49    { 1, 0, 0, 0, 0, 0, 0, 0, 0 },
    50    { 1, 0, 1, 0, 0, 0, 0, 0, 0 },
    51    { 1, 0, 1, 1, 1, 1, 0, 0, 0 },
    52    { 1, 0, 1, 1, 1, 1, 0, 0, 0 },
    53    { 1, 0, 1, 1, 1, 1, 1, 1, 0 },
    54    { 1, 0, 1, 1, 1, 1, 1, 1, 0 },
    55    { 1, 0, 1, 1, 1, 1, 1, 1, 1 },
    56    { 1, 0, 1, 1, 1, 1, 1, 1, 1 },
    57    UNUSED_LINE,
    58    { 0, 0, 0, 0, 0, 0, 0, 0, 1 },
    59    UNUSED_LINE,
    60    { 0, 0, 0, 0, 0, 0, 0, 1, 0 },
    61    UNUSED_LINE,
    62    { 0, 0, 0, 0, 0, 0, 1, 0, 0 },
    63    { 0, 0, 0, 0, 0, 0, 1, 1, 1 },
    64    UNUSED_LINE,
    65    { 0, 0, 0, 0, 0, 1, 0, 0, 0 },
    66    { 0, 0, 0, 0, 0, 1, 1, 1, 1 },
    67    { 0, 0, 0, 0, 0, 1, 1, 1, 1 }
     51   { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     52   { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 },
     53   { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
     54   { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
     55   { 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0 },
     56   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
     57   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
     58   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 },
     59   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
     60   { 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
     61   UNUSED_LINE,
     62   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 },
     63   UNUSED_LINE,
     64   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 },
     65   UNUSED_LINE,
     66   { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
     67   UNUSED_LINE,
     68   { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
     69   { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 },
     70   UNUSED_LINE,
     71   { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
     72   { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 },
     73   { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 }
    6874};
    6975
     
    7379
    7480static const rtems_blkdev_bnum trigger [READ_COUNT] = {
    75   1, 3, 5, 5, 7, 7, NO_TRIGGER, NO_TRIGGER,
     81  1, 3, 6, 6, 6, 9, 9, 9, NO_TRIGGER, NO_TRIGGER,
     82  TRIGGER_AFTER_RESET,
     83  11,
     84  TRIGGER_AFTER_RESET,
     85  10,
    7686  TRIGGER_AFTER_RESET,
    7787  9,
    7888  TRIGGER_AFTER_RESET,
    79   8,
    80   TRIGGER_AFTER_RESET,
    81   7, NO_TRIGGER,
    82   TRIGGER_AFTER_RESET,
    83   6, 8, NO_TRIGGER
     89  8, NO_TRIGGER,
     90  TRIGGER_AFTER_RESET,
     91  7, 10, NO_TRIGGER
    8492};
    8593
     
    8795
    8896static const rtems_blkdev_bnum next [READ_COUNT] = {
    89   2, 4, 6, 6, 8, 8, 8, 8,
    90   NOT_CHANGED_BY_RESET(8),
     97  2, 4, 7, 7, 7, 10, 10, 10, 10, 10,
     98  NOT_CHANGED_BY_RESET(10),
     99  12,
     100  NOT_CHANGED_BY_RESET(12),
     101  11,
     102  NOT_CHANGED_BY_RESET(11),
    91103  10,
    92104  NOT_CHANGED_BY_RESET(10),
    93   9,
     105  9, 9,
    94106  NOT_CHANGED_BY_RESET(9),
    95   8, 8,
    96   NOT_CHANGED_BY_RESET(8),
    97   7, 9, 9
     107  8, 11, 11
    98108};
    99109
     
    216226#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE 1
    217227#define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE BLOCK_COUNT
    218 #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 2
     228#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 3
    219229#define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY 1
    220230
  • testsuites/libtests/configure.ac

    r90b301c r1fb0e2d  
    4242# Explicitly list all Makefiles here
    4343AC_CONFIG_FILES([Makefile
     44block15/Makefile
    4445block14/Makefile
    4546block13/Makefile
Note: See TracChangeset for help on using the changeset viewer.