Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809789/?format=api
{ "id": 809789, "url": "http://patchwork.ozlabs.org/api/patches/809789/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/150455042211.455.6804897285651927718.stgit@firesoul/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<150455042211.455.6804897285651927718.stgit@firesoul>", "list_archive_url": null, "date": "2017-09-04T18:40:22", "name": "[net-next,V2] ixgbe: add counter for times rx pages gets allocated, not recycled", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "1e3852a955d7a83d38628b8e9e95a7684c8343e6", "submitter": { "id": 13625, "url": "http://patchwork.ozlabs.org/api/people/13625/?format=api", "name": "Jesper Dangaard Brouer", "email": "brouer@redhat.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/150455042211.455.6804897285651927718.stgit@firesoul/mbox/", "series": [ { "id": 1444, "url": "http://patchwork.ozlabs.org/api/series/1444/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=1444", "date": "2017-09-04T18:40:22", "name": "[net-next,V2] ixgbe: add counter for times rx pages gets allocated, not recycled", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1444/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809789/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809789/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=brouer@redhat.com" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xmJZJ27rDz9sPs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 5 Sep 2017 04:40:38 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id F3EB6864AA;\n\tMon, 4 Sep 2017 18:40:36 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id bhwSiJaT5VsD; Mon, 4 Sep 2017 18:40:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3D081864A4;\n\tMon, 4 Sep 2017 18:40:35 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 468011C0BE0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Sep 2017 18:40:32 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id DE4A884D8C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Sep 2017 18:40:31 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id oH4IB9yJLvbi for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Sep 2017 18:40:27 +0000 (UTC)", "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id B748484AB5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 4 Sep 2017 18:40:26 +0000 (UTC)", "from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id D021D7F7DA;\n\tMon, 4 Sep 2017 18:40:25 +0000 (UTC)", "from firesoul.localdomain (ovpn-200-42.brq.redhat.com\n\t[10.40.200.42])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 3F42081521;\n\tMon, 4 Sep 2017 18:40:23 +0000 (UTC)", "from [192.168.5.1] (localhost [IPv6:::1])\n\tby firesoul.localdomain (Postfix) with ESMTP id 382053318E71C;\n\tMon, 4 Sep 2017 20:40:22 +0200 (CEST)" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": [ "domain auto-whitelisted by SQLgrey-1.7.6", "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]); Mon, 04 Sep 2017 18:40:26 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com D021D7F7DA", "From": "Jesper Dangaard Brouer <brouer@redhat.com>", "To": "intel-wired-lan@lists.osuosl.org,\n\tJeff Kirsher <jeffrey.t.kirsher@intel.com>", "Date": "Mon, 04 Sep 2017 20:40:22 +0200", "Message-ID": "<150455042211.455.6804897285651927718.stgit@firesoul>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.12", "Cc": "netdev@vger.kernel.org, Jesper Dangaard Brouer <brouer@redhat.com>", "Subject": "[Intel-wired-lan] [net-next PATCH V2] ixgbe: add counter for times\n\trx pages gets allocated, not recycled", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "The ixgbe driver have page recycle scheme based around the RX-ring\nqueue, where a RX page is shared between two packets. Based on the\nrefcnt, the driver can determine if the RX-page is currently only used\nby a single packet, if so it can then directly refill/recycle the\nRX-slot by with the opposite \"side\" of the page.\n\nWhile this is a clever trick, it is hard to determine when this\nrecycling is successful and when it fails. Adding a counter, which is\navailable via ethtool --statistics as 'alloc_rx_page'. Which counts\nthe number of times the recycle fails and the real page allocator is\ninvoked. When interpreting the stats, do remember that every alloc\nwill serve two packets.\n\nThe counter is collected per rx_ring, but is summed and ethtool\nexported as 'alloc_rx_page'. It would be relevant to know what\nrx_ring that cannot keep up, but that can be exported later if\nsomeone experience a need for this.\n\nSigned-off-by: Jesper Dangaard Brouer <brouer@redhat.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 ++\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 +\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++++\n 3 files changed, 7 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex dd5578756ae0..008d0085e01f 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -275,6 +275,7 @@ struct ixgbe_rx_queue_stats {\n \tu64 rsc_count;\n \tu64 rsc_flush;\n \tu64 non_eop_descs;\n+\tu64 alloc_rx_page;\n \tu64 alloc_rx_page_failed;\n \tu64 alloc_rx_buff_failed;\n \tu64 csum_err;\n@@ -655,6 +656,7 @@ struct ixgbe_adapter {\n \tu64 rsc_total_count;\n \tu64 rsc_total_flush;\n \tu64 non_eop_descs;\n+\tu32 alloc_rx_page;\n \tu32 alloc_rx_page_failed;\n \tu32 alloc_rx_buff_failed;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex 72c565712a5f..d96d9d6c3492 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -104,6 +104,7 @@ static const struct ixgbe_stats ixgbe_gstrings_stats[] = {\n \t{\"tx_flow_control_xoff\", IXGBE_STAT(stats.lxofftxc)},\n \t{\"rx_flow_control_xoff\", IXGBE_STAT(stats.lxoffrxc)},\n \t{\"rx_csum_offload_errors\", IXGBE_STAT(hw_csum_rx_error)},\n+\t{\"alloc_rx_page\", IXGBE_STAT(alloc_rx_page)},\n \t{\"alloc_rx_page_failed\", IXGBE_STAT(alloc_rx_page_failed)},\n \t{\"alloc_rx_buff_failed\", IXGBE_STAT(alloc_rx_buff_failed)},\n \t{\"rx_no_dma_resources\", IXGBE_STAT(hw_rx_no_dma_resources)},\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex d962368d08d0..d6ac9da8d628 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1620,6 +1620,7 @@ static bool ixgbe_alloc_mapped_page(struct ixgbe_ring *rx_ring,\n \tbi->page = page;\n \tbi->page_offset = ixgbe_rx_offset(rx_ring);\n \tbi->pagecnt_bias = 1;\n+\trx_ring->rx_stats.alloc_rx_page++;\n \n \treturn true;\n }\n@@ -6771,6 +6772,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \tu32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot;\n \tu64 non_eop_descs = 0, restart_queue = 0, tx_busy = 0;\n \tu64 alloc_rx_page_failed = 0, alloc_rx_buff_failed = 0;\n+\tu64 alloc_rx_page = 0;\n \tu64 bytes = 0, packets = 0, hw_csum_rx_error = 0;\n \n \tif (test_bit(__IXGBE_DOWN, &adapter->state) ||\n@@ -6791,6 +6793,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \tfor (i = 0; i < adapter->num_rx_queues; i++) {\n \t\tstruct ixgbe_ring *rx_ring = adapter->rx_ring[i];\n \t\tnon_eop_descs += rx_ring->rx_stats.non_eop_descs;\n+\t\talloc_rx_page += rx_ring->rx_stats.alloc_rx_page;\n \t\talloc_rx_page_failed += rx_ring->rx_stats.alloc_rx_page_failed;\n \t\talloc_rx_buff_failed += rx_ring->rx_stats.alloc_rx_buff_failed;\n \t\thw_csum_rx_error += rx_ring->rx_stats.csum_err;\n@@ -6798,6 +6801,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \t\tpackets += rx_ring->stats.packets;\n \t}\n \tadapter->non_eop_descs = non_eop_descs;\n+\tadapter->alloc_rx_page = alloc_rx_page;\n \tadapter->alloc_rx_page_failed = alloc_rx_page_failed;\n \tadapter->alloc_rx_buff_failed = alloc_rx_buff_failed;\n \tadapter->hw_csum_rx_error = hw_csum_rx_error;\n", "prefixes": [ "net-next", "V2" ] }