mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
ib_srpt: Reduce CPU load caused by stopping a large number of sessions
Avoid that stopping a large number of SRPT sessions causes a high context switch frequency and hence a high CPU load. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2187,8 +2187,12 @@ static int srpt_compl_thread(void *arg)
|
||||
ch->sess_name, ch->qp->qp_num);
|
||||
scst_unregister_session(ch->sess, false, srpt_unreg_sess);
|
||||
|
||||
while (!kthread_should_stop())
|
||||
schedule_timeout(DIV_ROUND_UP(HZ, 10));
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
while (!kthread_should_stop()) {
|
||||
schedule();
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
}
|
||||
__set_current_state(TASK_RUNNING);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user