osc_lru_shrink() may need to handle lots of pages and this way
can block scheduling for long. add couple cond_resched() to
prevent kernel warnings and other thread's starvation.
Lustre-change: https://review.whamcloud.com/54346
Lustre-commit:
69eb7b89c7f36ec6a8970e87fc8859207f4b9c0c
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I862c568ac777c0b929a1ffb61e246b079aee6718
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54708
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
cl_io_fini(env, io);
cl_object_put(env, clobj);
clobj = NULL;
+ cond_resched();
}
clobj = tmp;
cl_io_fini(env, io);
cl_object_put(env, clobj);
+ cond_resched();
}
atomic_dec(&cli->cl_lru_shrinkers);