linux_dsm_epyc7002/drivers/s390/block
Stefan Haberland 59a9ed5f87 s390/dasd: reorder lcu and device lock
Reorder lcu and device lock to get rid of the error-prone trylock
mechanism.

The locking order is lcu lock -> device lock.
This protects against changes to the lcu device lists and enables us
to iterate over the devices, take the cdev lock and make changes to
the device structures.

The complicated part is the summary unit check handler that gets an
interrupt on one device of the lcu that leads to structural changes of
the whole lcu itself. This work needs to be done even if devices on
the lcu disappear. So a device independent worker is used.
The old approach tried to update some lcu structures and set up the
lcu worker in the interrupt context with the device lock held.
But this forced the lock order "cdev lock -> lcu lock" that made it
hard to have the lcu lock held and iterate over all devices and change
them.

The new approach is to schedule a device specific worker that gets
out of the interrupt context and rid of the device lock for summary
unit checks. This worker is able to take the lcu lock and schedule the
lcu worker that updates all devices. The time between interrupt and
worker execution is no problem because the devices in the lcu reject
all I/O in this time with an appropriate error. The dasd driver can
deal with this situation and re-drive the I/O later on.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-03-17 13:18:25 +01:00
..
dasd_3990_erp.c
dasd_alias.c s390/dasd: reorder lcu and device lock 2016-03-17 13:18:25 +01:00
dasd_devmap.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
dasd_diag.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-03-16 10:47:45 -07:00
dasd_diag.h s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
dasd_eckd.c s390/dasd: reorder lcu and device lock 2016-03-17 13:18:25 +01:00
dasd_eckd.h s390/dasd: reorder lcu and device lock 2016-03-17 13:18:25 +01:00
dasd_eer.c
dasd_erp.c s390/dasd: fix statistics for recovered requests 2013-08-28 09:19:34 +02:00
dasd_fba.c s390/dasd: remove casts to dasd_*_private 2016-03-07 13:12:02 +01:00
dasd_fba.h
dasd_genhd.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
dasd_int.h s390/dasd: reorder lcu and device lock 2016-03-17 13:18:25 +01:00
dasd_ioctl.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
dasd_proc.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
dasd.c s390/dasd: fix performance drop 2016-02-17 09:24:07 +01:00
dcssblk.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
Kconfig
Makefile
scm_blk_cluster.c s390/scm_block: fix off by one during cluster reservation 2015-02-26 09:24:47 +01:00
scm_blk.c s390/scm_block: make the number of reqs per HW req configurable 2014-12-08 09:42:47 +01:00
scm_blk.h s390/scm_block: make the number of reqs per HW req configurable 2014-12-08 09:42:47 +01:00
scm_drv.c
xpram.c block: change ->make_request_fn() and users to return a queue cookie 2015-11-07 10:40:46 -07:00