static int exit_value;
static struct itimerval itimer;
static pthread_t gtod_thread;
+static struct flist_head *cgroup_list;
+static char *cgroup_mnt;
struct io_log *agg_io_log[2];
}
}
- if (td->o.cgroup_weight && cgroup_setup(td))
+ if (td->o.cgroup_weight && cgroup_setup(td, cgroup_list, &cgroup_mnt))
goto err;
if (nice(td->o.nice) == -1) {
close_and_free_files(td);
close_ioengine(td);
cleanup_io_u(td);
- cgroup_shutdown(td);
+ cgroup_shutdown(td, &cgroup_mnt);
if (td->o.cpumask_set) {
int ret = fio_cpuset_exit(&td->o.cpumask);
status_timer_arm();
+ cgroup_list = smalloc(sizeof(*cgroup_list));
+ INIT_FLIST_HEAD(cgroup_list);
+
run_threads();
if (!fio_abort) {
}
}
+ cgroup_kill(cgroup_list);
+ sfree(cgroup_list);
+ if (cgroup_mnt)
+ sfree(cgroup_mnt);
+
fio_mutex_remove(startup_mutex);
fio_mutex_remove(writeout_mutex);
return exit_value;