Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1483222

Re: [RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing sas events

From Hannes Reinecke <hare@suse.de>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing sas events
Date 2016-09-14 14:00 +0200
Message-ID <shh18-no-29@gated-at.bofh.it> (permalink)
References <sgLDY-3OW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 09/13/2016 04:30 AM, Yijing Wang wrote:
> Now libsas hotplug work is static, LLDD driver queue
> the hotplug work into shost->work_q. If LLDD driver
> burst post lots hotplug event to libsas, the hotplug
> events may pending in the workqueue like
> 
> shost->workq
> tail | PHYE_LOSS_OF_SIGNAL  | PORTE_BYTES_DMAED | head
> 
> In this case, if a new PORTE_BYTES_DMAED event coming,
> it would be lost, because we can not queue a work which
> is already pending in the workqueue, also libsas has a
> pending bit to avoid queue the same event.
> 
> The lost hotplug event make something confusing, e.g.
> we have sas disks connected hardware, but we can not
> found them in kernel.
> 
> This patch remove the static defined hotplug work,
> and use dynamic work to avoid missing hotplug events.
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Signed-off-by: Yousong He <heyousong@huawei.com>
> Signed-off-by: Qilin Chen <chenqilin2@huawei.com>
> ---
>  drivers/scsi/libsas/sas_event.c    |   61 ++++++++++++++++++++---------------
>  drivers/scsi/libsas/sas_init.c     |    5 +--
>  drivers/scsi/libsas/sas_internal.h |    3 ++
>  drivers/scsi/libsas/sas_phy.c      |   50 ++++++++---------------------
>  drivers/scsi/libsas/sas_port.c     |   23 ++++++++------
>  include/scsi/libsas.h              |    8 -----
>  6 files changed, 66 insertions(+), 84 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing sas events Yijing Wang <wangyijing@huawei.com> - 2016-09-13 04:30 +0200
  Re: [RFC][PATCH v1 1/2] libsas: Alloc dynamic work to avoid missing  sas events Hannes Reinecke <hare@suse.de> - 2016-09-14 14:00 +0200

csiph-web