From b207f5a8f9a60fda4e995151af7d8670015e261d Mon Sep 17 00:00:00 2001 From: Peter Oberparleiter Date: Tue, 26 Nov 2013 14:57:13 +0100 Subject: s390/cio: Relax subchannel scan loop 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 Reviewed-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/css.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/s390/cio') diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 8c2cb87bccc..c1f9cc728c2 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -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; } -- cgit v1.2.3-70-g09d2