s390/cio: add cond_resched() in the slow_eval_known_fn() loop
authorVineeth Vijayan <vneethv@linux.ibm.com>
Thu, 18 Jun 2020 14:42:45 +0000 (16:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:21:19 +0000 (11:21 +0200)
commit63872be585b49a5af17339b6ca78e5ecc72f7934
tree64d8707e227f4a2dc214d1acd8858a018c81a1e2
parentc223fc8664f394e538b7601820bf2f03471f9402
s390/cio: add cond_resched() in the slow_eval_known_fn() loop

[ Upstream commit 0b8eb2ee9da1e8c9b8082f404f3948aa82a057b2 ]

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: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/cio/css.c