Changeset f258932 for lib/ior-thread.c


Ignore:
Timestamp:
09/16/11 10:14:11 (10 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
2cf2c2d
Parents:
24ca459
Message:
  • Bumped default number of IO buffers up to a total of 50 MB
  • Added a LIBTRACEIO option to adjust the number of IO buffers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ior-thread.c

    r948ed9a rf258932  
    5959/* 1MB Buffer */
    6060#define BUFFERSIZE (1024*1024)
    61 #define BUFFERS 5
    6261
    6362extern io_source_t thread_source;
     
    7271struct state_t {
    7372        /* The collection of buffers (or slices) */
    74         struct buffer_t buffer[BUFFERS];
     73        struct buffer_t *buffer;
    7574        /* The index of the buffer to read into next */
    7675        int in_buffer;
     
    151150
    152151                /* Move on to the next buffer */
    153                 buffer=(buffer+1) % BUFFERS;
     152                buffer=(buffer+1) % max_buffers;
    154153
    155154        } while(running);
     
    177176        state->source = &thread_source;
    178177
     178        DATA(state)->buffer = (struct buffer_t *)malloc(sizeof(struct buffer_t) * max_buffers);
    179179        DATA(state)->in_buffer = 0;
    180180        DATA(state)->offset = 0;
     
    245245                        INBUFFER(state).state = EMPTY;
    246246                        pthread_cond_signal(&DATA(state)->space_avail);
    247                         newbuffer = (newbuffer+1) % BUFFERS;
     247                        newbuffer = (newbuffer+1) % max_buffers;
    248248                        DATA(state)->offset = 0;
    249249                }
Note: See TracChangeset for help on using the changeset viewer.