#include "smalloc.h"
#include "verify.h"
#include "diskutil.h"
+#include "cgroup.h"
unsigned long page_mask;
unsigned long page_size;
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
- min_events = td->o.iodepth_batch_complete;
+ min_events = min(td->o.iodepth_batch_complete,
+ td->cur_depth);
if (full && !min_events)
min_events = 1;
*/
full = queue_full(td) || ret == FIO_Q_BUSY;
if (full || !td->o.iodepth_batch_complete) {
- min_evts = td->o.iodepth_batch_complete;
+ min_evts = min(td->o.iodepth_batch_complete,
+ td->cur_depth);
if (full && !min_evts)
min_evts = 1;
}
}
+ if (td->o.cgroup_weight && cgroup_setup(td))
+ goto err;
+
if (nice(td->o.nice) == -1) {
td_verror(td, errno, "nice");
goto err;
close_and_free_files(td);
close_ioengine(td);
cleanup_io_u(td);
+ cgroup_shutdown(td);
if (td->o.cpumask_set) {
int ret = fio_cpuset_exit(&td->o.cpumask);