Lines Matching full:aio
73 return map->aio.nr_cblocks > 0; in perf_mmap__aio_enabled()
79 map->aio.data[idx] = mmap(NULL, mmap__mmap_len(map), PROT_READ|PROT_WRITE, in perf_mmap__aio_alloc()
81 if (map->aio.data[idx] == MAP_FAILED) { in perf_mmap__aio_alloc()
82 map->aio.data[idx] = NULL; in perf_mmap__aio_alloc()
91 if (map->aio.data[idx]) { in perf_mmap__aio_free()
92 munmap(map->aio.data[idx], mmap__mmap_len(map)); in perf_mmap__aio_free()
93 map->aio.data[idx] = NULL; in perf_mmap__aio_free()
106 data = map->aio.data[idx]; in perf_mmap__aio_bind()
116 pr_err("Failed to bind [%p-%p] AIO buffer to node %lu: error %m\n", in perf_mmap__aio_bind()
128 map->aio.data[idx] = malloc(mmap__mmap_len(map)); in perf_mmap__aio_alloc()
129 if (map->aio.data[idx] == NULL) in perf_mmap__aio_alloc()
137 zfree(&(map->aio.data[idx])); in perf_mmap__aio_free()
151 map->aio.nr_cblocks = mp->nr_cblocks; in perf_mmap__aio_mmap()
152 if (map->aio.nr_cblocks) { in perf_mmap__aio_mmap()
153 map->aio.aiocb = calloc(map->aio.nr_cblocks, sizeof(struct aiocb *)); in perf_mmap__aio_mmap()
154 if (!map->aio.aiocb) { in perf_mmap__aio_mmap()
158 map->aio.cblocks = calloc(map->aio.nr_cblocks, sizeof(struct aiocb)); in perf_mmap__aio_mmap()
159 if (!map->aio.cblocks) { in perf_mmap__aio_mmap()
163 map->aio.data = calloc(map->aio.nr_cblocks, sizeof(void *)); in perf_mmap__aio_mmap()
164 if (!map->aio.data) { in perf_mmap__aio_mmap()
169 for (i = 0; i < map->aio.nr_cblocks; ++i) { in perf_mmap__aio_mmap()
180 * to denote started aio write operation on the in perf_mmap__aio_mmap()
184 map->aio.cblocks[i].aio_fildes = -1; in perf_mmap__aio_mmap()
187 * faster aio write system calls because queued requests in perf_mmap__aio_mmap()
194 map->aio.cblocks[i].aio_reqprio = prio >= 0 ? prio : 0; in perf_mmap__aio_mmap()
205 for (i = 0; i < map->aio.nr_cblocks; ++i) in perf_mmap__aio_munmap()
207 if (map->aio.data) in perf_mmap__aio_munmap()
208 zfree(&map->aio.data); in perf_mmap__aio_munmap()
209 zfree(&map->aio.cblocks); in perf_mmap__aio_munmap()
210 zfree(&map->aio.aiocb); in perf_mmap__aio_munmap()