Changeset d5549f4a in rtems


Ignore:
Timestamp:
Jul 3, 2012, 3:19:33 PM (8 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
fac44e12
Parents:
98458542 (diff), 2cc4f3c (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 'master' of ssh://git.rtems.org/data/git/rtems

Files:
4 added
7 edited

Legend:

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

    r98458542 rd5549f4a  
    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
     
    20852084              media_block + dd->start, block, (unsigned) dd->dev);
    20862085
    2087     rtems_bdbuf_check_read_ahead_trigger (dd, block);
    20882086    bd = rtems_bdbuf_get_buffer_for_access (dd, media_block);
    20892087    switch (bd->state)
     
    21162114        break;
    21172115    }
     2116
     2117    rtems_bdbuf_check_read_ahead_trigger (dd, block);
    21182118  }
    21192119
     
    22982298    uint32_t last_block = 0;
    22992299
    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 
    23062300    rtems_disk_device *dd = transfer->dd;
    2307 
    2308     bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
     2301    uint32_t media_blocks_per_block = dd->media_blocks_per_block;
     2302    bool need_continuous_blocks =
     2303      (dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_MULTISECTOR_CONT) != 0;
    23092304
    23102305    /*
     
    23352330        printf ("bdbuf:swapout write: bd:%" PRIu32 ", bufnum:%" PRIu32 " mode:%s\n",
    23362331                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)))
     2332                need_continuous_blocks ? "MULTI" : "SCAT");
     2333
     2334      if (need_continuous_blocks && transfer->write_req->bufnum &&
     2335          bd->block != last_block + media_blocks_per_block)
    23432336      {
    23442337        rtems_chain_prepend_unprotected (&transfer->bds, &bd->link);
     
    30363029          {
    30373030            transfer_count = max_transfer_count;
    3038             dd->read_ahead.trigger += max_transfer_count / 2 + 1;
    3039             dd->read_ahead.next += max_transfer_count;
     3031            dd->read_ahead.trigger = block + transfer_count / 2;
     3032            dd->read_ahead.next = block + transfer_count;
    30403033          }
    30413034          else
  • cpukit/libcsupport/include/rtems/deviceio.h

    r98458542 rd5549f4a  
    1212
    1313#include <rtems/libio.h>
     14
     15#ifdef __cplusplus
     16extern "C" {
     17#endif /* __cplusplus */
    1418
    1519int rtems_deviceio_errno( rtems_status_code status );
     
    5458);
    5559
     60#ifdef __cplusplus
     61}
     62#endif /* __cplusplus */
     63
    5664#endif /* _RTEMS_DEVICEIO_H */
  • testsuites/libtests/Makefile.am

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

    r98458542 rd5549f4a  
    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

    r98458542 rd5549f4a  
    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

    r98458542 rd5549f4a  
    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, 9
     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, 1, 1, 1, 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, 1 },
     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, 5, 5, 8, 8, 8, NO_TRIGGER, 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, 9, 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, 10, 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

    r98458542 rd5549f4a  
    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.