Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2987128ybg; Mon, 28 Oct 2019 05:44:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwH3icC706ofPmSu/eEzyC2l5eryyymobhz+7JaoF/XbZgPX/Au+m5Nfmgx2OuYsj/CgQMo X-Received: by 2002:a05:6402:6cc:: with SMTP id n12mr13102350edy.38.1572266663445; Mon, 28 Oct 2019 05:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572266663; cv=none; d=google.com; s=arc-20160816; b=0QT4SS+sXT3qmNzIKziw0VgzW207fPH8+M25vfQvUbNWjMCVy85xsL1bHY6HL+nID4 +MTLfcw2jYjXsaQ+Jz+E7d00C2LSUN9d6cz8fuklseJhl7fENHGgRGSqhVBB6sBxtkOI n52aeAQe3aFPYM4f3PWy6fXRtdK7LMLUCzUFcBvEU42pl7fbRE86l1x7q5IAAPWiOONU ocwCjOSx7McYNdzR0SjnOPtnEwYMNpzjQGoO+CbFQYfOmQcr7iQP7XdWl/RkrYyjCB/B kTVMnG26DqbvDVFvDCk4GZvYZ1hjcSPRp6XJff9YM/jZJzcIQ2g6Vh5R6Lpfdfh6HBoQ I9BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=rOsNR1c4n+NsjrpUTMCypcHXobzyQJw4zkuBXyhB7MM=; b=gk5rsNm+D0l9iolNsyWiZFLwkoCUNHQ1pGyCKJ9xNAM/g8u2ZfY4mA/dyrGHWjwGGk sKCI3IKnuWqTsdHG4DnjwJ6z5VAFc46TwLwUxXkDP24df18yIv4PsfGJIhJlrr0C0VBF OXap6GgEC+4Czhip8JPLyHC9P55mAfABNqEv6pxGNu7cPlnyyx2B8qdD3RO0MpVAzCOQ DEQas1/KRnfBDeyjO2XasEJY4dxaN0awtvpMwDGJOgWXWnw+9IOrRUIA+ZIgn9f4mn8P 3vriov+gBDo10OkG3s0RRa7G25GpMxSgNoaYRXbTtP9jqPXj9qcmsqhilRTWLL/vh7ja 4rOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si2625293edc.426.2019.10.28.05.43.59; Mon, 28 Oct 2019 05:44:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729293AbfJ1BZJ (ORCPT + 99 others); Sun, 27 Oct 2019 21:25:09 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:4772 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729241AbfJ1BZJ (ORCPT ); Sun, 27 Oct 2019 21:25:09 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id C616894E157386EA662A; Mon, 28 Oct 2019 09:25:05 +0800 (CST) Received: from [127.0.0.1] (10.67.103.228) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.439.0; Mon, 28 Oct 2019 09:24:55 +0800 Subject: Re: [PATCH] net: hisilicon: Fix ping latency when deal with high throughput To: Joe Perches , , , References: <1572079779-76449-1-git-send-email-xiaojiangfeng@huawei.com> CC: , , , , , , From: Jiangfeng Xiao Message-ID: <260be568-cbda-5e27-ac06-d6ee6194a0c2@huawei.com> Date: Mon, 28 Oct 2019 09:24:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.228] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/26 23:44, Joe Perches wrote: > On Sat, 2019-10-26 at 16:49 +0800, Jiangfeng Xiao wrote: >> This is due to error in over budget processing. >> When dealing with high throughput, the used buffers >> that exceeds the budget is not cleaned up. In addition, >> it takes a lot of cycles to clean up the used buffer, >> and then the buffer where the valid data is located can take effect. > [] >> diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c > [] >> @@ -575,7 +575,7 @@ static int hip04_rx_poll(struct napi_struct *napi, int budget) >> struct hip04_priv *priv = container_of(napi, struct hip04_priv, napi); >> struct net_device *ndev = priv->ndev; >> struct net_device_stats *stats = &ndev->stats; >> - unsigned int cnt = hip04_recv_cnt(priv); >> + static unsigned int cnt_remaining; > > static doesn't seem a great idea here as it's for just a single > driver instance. Maybe make this part of struct hip04_priv? > Thank you for your review. Your suggestion is very good.