Commit 0b8eb2ee authored by Vineeth Vijayan's avatar Vineeth Vijayan Committed by Heiko Carstens

s390/cio: add cond_resched() in the slow_eval_known_fn() loop

The scanning through subchannels during the time of an event could
take significant amount of time in case of platforms with lots of
known subchannels. This might result in higher scheduling latencies
for other tasks especially on systems with a single CPU. Add
cond_resched() call, as the loop in slow_eval_known_fn() can be
executed for a longer duration.
Reviewed-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 9123e3a7
...@@ -677,6 +677,11 @@ static int slow_eval_known_fn(struct subchannel *sch, void *data) ...@@ -677,6 +677,11 @@ static int slow_eval_known_fn(struct subchannel *sch, void *data)
rc = css_evaluate_known_subchannel(sch, 1); rc = css_evaluate_known_subchannel(sch, 1);
if (rc == -EAGAIN) if (rc == -EAGAIN)
css_schedule_eval(sch->schid); css_schedule_eval(sch->schid);
/*
* The loop might take long time for platforms with lots of
* known devices. Allow scheduling here.
*/
cond_resched();
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment