s390/css: validate subchannel prior to allocation
authorSebastian Ott <sebott@linux.ibm.com>
Mon, 25 Jun 2018 09:23:26 +0000 (11:23 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 17 Jul 2018 05:27:54 +0000 (07:27 +0200)
commit05b217f4c5573f34f6799698f7d4162c702132bc
tree5678caf88c1ae544b4f3f81f4cdc8332d0ba19b5
parent71aa11a40d1a1d80196b55d8dd95be2bc4c1649e
s390/css: validate subchannel prior to allocation

In css_alloc_subchannel we allocate the subchannel and do a
validation of the subchannel (to decide if we should look for
devices via this subchannel). On a typical LPAR we find lots
of subchannels to be invalid (because there is no device
attached or the device is blacklisted) leading to lots of
useless kmalloc and kfree calls.

This patch changes the order to only allocate the subchannels
that have been found valid.

Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cio.c
drivers/s390/cio/cio.h
drivers/s390/cio/css.c