Skip to content

Commit

Permalink
s390/cio: Relax subchannel scan loop
Browse files Browse the repository at this point in the history
The CIO layer scans for newly available I/O devices by performing a scan
of available subchannels using the Store Subchannel (STSCH) instruction.
This processing can take a significant amount of time during which no
other task can run on the same CPU (unless CONFIG_PREEMPT has been
enabled). As a result, scheduling latencies for other tasks are
increased noticeably, especially on a single-CPU system.

Fix this problem by explicitly allowing other tasks to be scheduled
each time a subchannel has been processed.

Signed-off-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Peter Oberparleiter authored and Martin Schwidefsky committed Dec 16, 2013
1 parent 449666d commit b207f5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ static int slow_eval_unknown_fn(struct subchannel_id schid, void *data)
default:
rc = 0;
}
/* Allow scheduling here since the containing loop might
* take a while. */
cond_resched();
}
return rc;
}
Expand Down

0 comments on commit b207f5a

Please sign in to comment.