From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cathy Avery Subject: Re: [PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun Date: Mon, 17 Apr 2017 15:44:22 -0400 Message-ID: <58F51B16.1070202@redhat.com> References: <1492263790-11378-1-git-send-email-cavery@redhat.com> <20170415140647.GA12851@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170415140647.GA12851@infradead.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Christoph Hellwig Cc: sthemmin@microsoft.com, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, haiyangz@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, jejb@linux.vnet.ibm.com List-Id: linux-scsi@vger.kernel.org On 04/15/2017 10:06 AM, Christoph Hellwig wrote: > Just add a singlethreaded workqueue for storvsc_handle_error and you'll > get serialization for all error handling for free. The problem I am seeing is that many work items can be queued up for the same lun before it goes away. The single threaded queue would have to allow for only a queue of one and no more. Either that or each work item for a particular lun must have the same memory address so it gets rejected if it you try to queue a remove to the same lun twice. Maybe I am not understanding your suggestion correctly. Thanks, Cathy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756550AbdDQTo2 (ORCPT ); Mon, 17 Apr 2017 15:44:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752807AbdDQToZ (ORCPT ); Mon, 17 Apr 2017 15:44:25 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5377E4DD70 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=cavery@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5377E4DD70 From: Cathy Avery Subject: Re: [PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun To: Christoph Hellwig References: <1492263790-11378-1-git-send-email-cavery@redhat.com> <20170415140647.GA12851@infradead.org> Cc: kys@microsoft.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, sthemmin@microsoft.com, haiyangz@microsoft.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Message-ID: <58F51B16.1070202@redhat.com> Date: Mon, 17 Apr 2017 15:44:22 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20170415140647.GA12851@infradead.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 17 Apr 2017 19:44:25 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/15/2017 10:06 AM, Christoph Hellwig wrote: > Just add a singlethreaded workqueue for storvsc_handle_error and you'll > get serialization for all error handling for free. The problem I am seeing is that many work items can be queued up for the same lun before it goes away. The single threaded queue would have to allow for only a queue of one and no more. Either that or each work item for a particular lun must have the same memory address so it gets rejected if it you try to queue a remove to the same lun twice. Maybe I am not understanding your suggestion correctly. Thanks, Cathy