ib_srpt: Process receive completions on the context of an SCST worker thread

instead of on the context of an srpt thread. Improves performance for many
configurations but decreases performance up to 10% in some cases.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4219 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2012-04-21 11:51:48 +00:00
parent 462974b410
commit cd3f9bfea8

View File

@@ -2011,7 +2011,7 @@ static int srpt_compl_thread(void *arg)
#endif
while (ch->state < CH_LIVE) {
srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD,
SCST_CONTEXT_DIRECT);
SCST_CONTEXT_THREAD);
schedule();
set_current_state(TASK_INTERRUPTIBLE);
}
@@ -2027,7 +2027,7 @@ static int srpt_compl_thread(void *arg)
#endif
while (!ch->last_wqe_received) {
srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD,
SCST_CONTEXT_DIRECT);
SCST_CONTEXT_THREAD);
schedule();
set_current_state(TASK_INTERRUPTIBLE);
}
@@ -2040,7 +2040,7 @@ static int srpt_compl_thread(void *arg)
for (;;) {
set_current_state(TASK_INTERRUPTIBLE);
srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD,
SCST_CONTEXT_DIRECT);
SCST_CONTEXT_THREAD);
if (atomic_read(&ch->scst_sess->sess_cmd_count) == 0)
break;
schedule_timeout(HZ / 10);