]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: libsas: shut down the PHY if events reached the threshold
authorJason Yan <yanaijie@huawei.com>
Fri, 8 Dec 2017 09:42:05 +0000 (17:42 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 28 Feb 2018 14:47:02 +0000 (08:47 -0600)
commitef84e289414f15e2a904bbfcd773673dcb14a605
tree545e6540091afe22f533288d4686fdc0dd42037b
parent6bd9033af3d5bfa1d1280e1ebaf8e83f277802c5
scsi: libsas: shut down the PHY if events reached the threshold

BugLink: https://bugs.launchpad.net/bugs/1752146
If the PHY burst too many events, we will alloc a lot of events for the
worker. This may leads to memory exhaustion.

Dan Williams suggested to shut down the PHY if the events reached the
threshold, because in this case the PHY may have gone into some
erroneous state. Users can re-enable the PHY by sysfs if they want.

We cannot use the fixed memory pool because if we run out of events, the
shut down event and loss of signal event will lost too. The events still
need to be allocated and processed in this case.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
CC: John Garry <john.garry@huawei.com>
CC: Johannes Thumshirn <jthumshirn@suse.de>
CC: Ewan Milne <emilne@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
CC: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit f12486e06ae87453530f00a6cb49b60ae3fe4551)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/libsas/sas_init.c
drivers/scsi/libsas/sas_phy.c
include/scsi/libsas.h