From patchwork Thu Mar 15 02:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10283859 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 DE4306038F for ; Thu, 15 Mar 2018 02:57:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFFEF285E4 for ; Thu, 15 Mar 2018 02:57:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4A1328630; Thu, 15 Mar 2018 02:57:28 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 3841A285E4 for ; Thu, 15 Mar 2018 02:57:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751626AbeCOC50 (ORCPT ); Wed, 14 Mar 2018 22:57:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33976 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbeCOC50 (ORCPT ); Wed, 14 Mar 2018 22:57:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X2urv/yTA5Row2j3ZGtVvsZ1J5cdYQcRj3hPoHI8DPo=; b=s54FfBSNIyGhuS2UPDl01ti4vO yFV7eioGtqIER4pSPu4M81mL6nJOjNyXYSz5wVhtBLLgk8xfwHyRbBnDj6pNyx81HoO4fSOmXK/+F 5uPKt3tRP7pvUcRgtX+3YuwbH8Pt94O1D7B1AsjoGSDKnhsLEWOU0cwYV507yk3SLGTQBhya5eLTw YOv6DqxFuvrSDTbbWV+y8bdlUDRyzcM9pKmcRHrXA2ro2YSHj1JqKqFkhHNPzqpBPX6lBrUE+qT8w w3ubV+R57j9DMrbIzGuSUeBMo3MCma6kgwgO7PzJRFyoHnZ0WBMcScO37U3lhFNCAe1Pr38Weai3h w89WzHPQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewJ52-0000tV-9h; Thu, 15 Mar 2018 02:57:24 +0000 Date: Wed, 14 Mar 2018 19:57:24 -0700 From: Matthew Wilcox To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH] mlx5: Remove call to ida_pre_get Message-ID: <20180315025724.GB9973@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Matthew Wilcox The mlx5 driver calls ida_pre_get() in a loop for no readily apparent reason. The driver uses ida_simple_get() which will call ida_pre_get() by itself and there's no need to use ida_pre_get() unless using ida_get_new(). Signed-off-by: Matthew Wilcox --- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 10e16381f20a..3ba07c7096ef 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1647,7 +1647,6 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft, list_for_each_entry(iter, match_head, list) { nested_down_read_ref_node(&iter->g->node, FS_LOCK_PARENT); - ida_pre_get(&iter->g->fte_allocator, GFP_KERNEL); } search_again_locked: