From patchwork Tue Nov 6 02:20:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 197393 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7D95C2C00C2 for ; Tue, 6 Nov 2012 13:20:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933616Ab2KFCUq (ORCPT ); Mon, 5 Nov 2012 21:20:46 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:40196 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933594Ab2KFCUp (ORCPT ); Mon, 5 Nov 2012 21:20:45 -0500 Received: by mail-pa0-f46.google.com with SMTP id hz1so4380264pad.19 for ; Mon, 05 Nov 2012 18:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=pkItZE4HcDtZylFmq4xj52qZjBF/gN9sYsuLDNLH1yg=; b=qKhZP/WUW7MM1x0ea/UnCF8OoYZed+mckn0AFIA5ninh+ClERBq8NzyHP/b+ksRaIz z6BQnMixFAxi26rkQqZxQcf26fS+JCDccE7NX4aYAeEXPklV+BCpgokdlks5nO19YnSd aQNkVC66KeJaO3qx5rQHV0GycHUXX5d/dzB92fI5he5QdmichgfLVSf4yyb4Y812UIPg JtNuw9xs+/aSI7w/DVTI0aI+o8yZx9O8CqsfA6nE2CLHHkfZza4AySwpyThwq1PJ1xHj Q+e9NLZlJPfqEJxMC3JyPuTLngZHPOmTwny4qCox3THWFHwuH/EV+7fStCF7v8hV+TAm r93g== Received: by 10.68.251.197 with SMTP id zm5mr35754720pbc.30.1352168444714; Mon, 05 Nov 2012 18:20:44 -0800 (PST) Received: from [172.19.68.135] (dhcp-172-19-68-135.mtv.corp.google.com [172.19.68.135]) by mx.google.com with ESMTPS id jw14sm11472312pbb.36.2012.11.05.18.20.43 (version=SSLv3 cipher=OTHER); Mon, 05 Nov 2012 18:20:43 -0800 (PST) Subject: [PATCH net-next] mlx4: change TX coalescing defaults From: Eric Dumazet To: David Miller Cc: netdev , Yevgeny Petrilin , Or Gerlitz , Vimalkumar Date: Mon, 05 Nov 2012 18:20:42 -0800 Message-ID: <1352168442.3140.32.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet mlx4 currently uses a too high tx coalescing setting, deferring TX completion interrupts by up to 128 us. With the recent skb_orphan() removal in commit 8112ec3b872, performance of a single TCP flow is capped to ~4 Gbps, unless we increase tcp_limit_output_bytes. I suggest using 16 us instead of 128 us, allowing a finer control. Performance of a single TCP flow is restored to previous levels, while keeping TCP small queues fully enabled with default sysctl. This patch is also a BQL prereq. Reported-by: Vimalkumar Signed-off-by: Eric Dumazet Cc: Yevgeny Petrilin Cc: Or Gerlitz Acked-by: Amir Vadai --- By the way, is BQL addition planned for this driver ? drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 2 +- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" 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/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index edd9cb8..2b23ca2 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c @@ -870,7 +870,7 @@ static void mlx4_en_set_default_moderation(struct mlx4_en_priv *priv) /* If we haven't received a specific coalescing setting * (module param), we set the moderation parameters as follows: * - moder_cnt is set to the number of mtu sized packets to - * satisfy our coelsing target. + * satisfy our coalescing target. * - moder_time is set to a fixed value. */ priv->rx_frames = MLX4_EN_RX_COAL_TARGET; diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h index 9d27e42..8a5e70d 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h @@ -126,7 +126,7 @@ enum { #define MLX4_EN_RX_COAL_TIME 0x10 #define MLX4_EN_TX_COAL_PKTS 16 -#define MLX4_EN_TX_COAL_TIME 0x80 +#define MLX4_EN_TX_COAL_TIME 0x10 #define MLX4_EN_RX_RATE_LOW 400000 #define MLX4_EN_RX_COAL_TIME_LOW 0