From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932188AbdJUPot (ORCPT ); Sat, 21 Oct 2017 11:44:49 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:50376 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932147AbdJUPor (ORCPT ); Sat, 21 Oct 2017 11:44:47 -0400 X-Google-Smtp-Source: ABhQp+QHk9L8SZUrzu1aGJJFFr3gsZqpfyA2mdlbI1nlyvWisSl41qV9pylOziGwgTWQWJLPhpaCjw== Date: Sat, 21 Oct 2017 08:44:44 -0700 From: Tejun Heo To: Christoph Hellwig Cc: Cathy Avery , kys@microsoft.com, haiyangz@microsoft.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, dan.carpenter@oracle.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun Message-ID: <20171021154444.GK1302522@devbig577.frc2.facebook.com> References: <1508261721-24144-1-git-send-email-cavery@redhat.com> <20171019153510.GA7633@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171019153510.GA7633@infradead.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, Oct 19, 2017 at 08:35:10AM -0700, Christoph Hellwig wrote: > On Tue, Oct 17, 2017 at 01:35:21PM -0400, Cathy Avery wrote: > > + /* > > + * Set the error handler work queue. > > + */ > > + snprintf(host_dev->work_q_name, sizeof(host_dev->work_q_name), > > + "storvsc_error_wq_%d", host->host_no); > > + host_dev->handle_error_wq = > > + create_singlethread_workqueue(host_dev->work_q_name); > > If you use alloc_ordered_workqueue directly instead of > create_singlethread_workqueue you can pass a format string and don't > need the separate allocation. > > But I'm not sure if Tejun is fine with using __WQ_LEGACY directly.. The only thing that flag does is exempting the workqueue from possible flush deadlock check as we don't know whether WQ_MEM_RECLAIM on a legacy workqueue is intentional. There's no reason to add it when converting to alloc_ordered_workqueue(). Just decide whether it needs forward progress guarantee and use WQ_MEM_RECLAIM if so. Thanks. -- tejun