Lines Matching refs:buf_size
41 void mem_flush(unsigned char *buf, size_t buf_size)
46 buf_size = buf_size / CL_SIZE; /* mem size in cache lines */
48 for (i = 0; i < buf_size; i++)
65 static int fill_one_span_read(unsigned char *buf, size_t buf_size)
67 unsigned int size = buf_size / (CL_SIZE / 2);
91 static void fill_one_span_write(unsigned char *buf, size_t buf_size)
93 unsigned char *end_ptr = buf + buf_size;
103 void fill_cache_read(unsigned char *buf, size_t buf_size, bool once)
108 ret = fill_one_span_read(buf, buf_size);
117 static void fill_cache_write(unsigned char *buf, size_t buf_size, bool once)
120 fill_one_span_write(buf, buf_size);
126 unsigned char *alloc_buffer(size_t buf_size, int memflush)
133 ret = posix_memalign(&buf, PAGE_SIZE, buf_size);
139 s64 = buf_size / sizeof(uint64_t);
149 mem_flush(buf, buf_size);
154 int run_fill_buf(size_t buf_size, int memflush, int op, bool once)
158 buf = alloc_buffer(buf_size, memflush);
163 fill_cache_read(buf, buf_size, once);
165 fill_cache_write(buf, buf_size, once);