From patchwork Thu Oct 13 12:43:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurence Oberman X-Patchwork-Id: 9374931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38C6E6075E for ; Thu, 13 Oct 2016 12:44:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27C9F2A04C for ; Thu, 13 Oct 2016 12:44:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A1EF2A04F; Thu, 13 Oct 2016 12:44:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABBCB2A04C for ; Thu, 13 Oct 2016 12:44:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754421AbcJMMov (ORCPT ); Thu, 13 Oct 2016 08:44:51 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:37884 "EHLO mx3-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753673AbcJMMou (ORCPT ); Thu, 13 Oct 2016 08:44:50 -0400 Received: from zmail22.collab.prod.int.phx2.redhat.com (zmail22.collab.prod.int.phx2.redhat.com [10.5.83.26]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9DChUxq019268; Thu, 13 Oct 2016 08:43:30 -0400 Date: Thu, 13 Oct 2016 08:43:30 -0400 (EDT) From: Laurence Oberman To: Hannes Reinecke , Ewan Milne Cc: Bud Brown , Linux SCSI Mailinglist , "Curtis Taylor (cjt@us.ibm.com)" , fcoe-devel@open-fcoe.org Message-ID: <2049046384.1533310.1476362610308.JavaMail.zimbra@redhat.com> In-Reply-To: <1564904000.1465519.1476321625269.JavaMail.zimbra@redhat.com> References: <209207528.804499.1475931430678.JavaMail.zimbra@redhat.com> <2d30ad34-7a5e-b2ba-05f4-b0d831944f4c@suse.de> <1476197489.4019.68.camel@localhost.localdomain> <1476286016.4019.105.camel@localhost.localdomain> <000ebf71-9b7a-e6f6-ff8f-0f06eeef64fa@suse.de> <1564904000.1465519.1476321625269.JavaMail.zimbra@redhat.com> Subject: Patch: [Open-FCoE] Revert commit 3e22760d4db6fd89e0be46c3d132390a251da9c6 due to performance issues MIME-Version: 1.0 X-Originating-IP: [10.3.237.119] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF38 (Linux)/8.0.6_GA_5922) Thread-Topic: Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE Thread-Index: 4JWjUxc5MTCJ1NuI/y7ySTFjiWQMegWKQAg2 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello This patch reverts commit 3e22760d4db6fd89e0be46c3d132390a251da9c6. This revert came about because of efforts by Ewan Milne, Curtis Taylor and I. In researching this issue, significant performance issues were seen on large CPU count systems using the software FCOE stack. Hannes also weighed in. The same was not apparent on much smaller low count CPU systems. The behavior introduced by commit 3e22760d4db6fd89e0be46c3d132390a251da9c6 lands sup with large count CPU systems seeing continual blk_requeue_request() calls due to ML_QUEUE_HOST_BUSY. From Ewan: fc_exch_alloc() used to try all the available exchange managers in the list for an available exchange id, but this was changed in 2010 so that if the first matched exchange manager couldn't allocate one, it fails and we end up returning host busy. This was due to commit: Setting the ddp_min module parameter to fcoe to 128MB prevents the ->match function from permitting the use of the offload exchange manager for the frame, and we no longer see the problem with host busy status, since it uses the larger non-offloaded pool. Reverting commit 3e22760d4db6fd89e0be46c3d132390a251da9c6 was tested to also prevent the host busy issue due to failing allocations. Suggested-by: Ewan Milne Suggested-by: Curtis Taylor Tested-by: Laurence Oberman Signed-off-by: Laurence Oberman the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Hannes Reinecke Acked-by: Johannes Thumshirn diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index e72673b..d5c4048 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -892,10 +892,15 @@ static inline struct fc_exch *fc_exch_alloc(struct fc_lport *lport, struct fc_frame *fp) { struct fc_exch_mgr_anchor *ema; + struct fc_exch *ep; - list_for_each_entry(ema, &lport->ema_list, ema_list) - if (!ema->match || ema->match(fp)) - return fc_exch_em_alloc(lport, ema->mp); + list_for_each_entry(ema, &lport->ema_list, ema_list) { + if (!ema->match || ema->match(fp)) { + ep = fc_exch_em_alloc(lport, ema->mp); + if (ep) + return ep; + } + } return NULL; } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in