All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brelinski, Tony" <tony.brelinski@intel.com>
To: "Lobakin, Alexandr" <alexandr.lobakin@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: RE: [Intel-wired-lan] [PATCH net-next 1/9] e1000: switch to napi_consume_skb()
Date: Tue, 28 Dec 2021 00:06:37 +0000	[thread overview]
Message-ID: <DM6PR11MB4218AFE1E9E4DD604693DFBC82439@DM6PR11MB4218.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211123171840.157471-2-alexandr.lobakin@intel.com>

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Alexander Lobakin
> Sent: Tuesday, November 23, 2021 9:19 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jakub Kicinski
> <kuba@kernel.org>; David S. Miller <davem@davemloft.net>
> Subject: [Intel-wired-lan] [PATCH net-next 1/9] e1000: switch to
> napi_consume_skb()
> 
> In order to take the best from per-cpu NAPI skbuff_head caches and CPU
> cycles, let's switch from dev_kfree_skb_any(), which passes skb back to the
> mm layer, to napi_consume_skb(), which feeds those caches on non-zero
> budget instead (falls back to the former on 0).
> Do the replacement in e1000_unmap_and_free_tx_resource(). There are
> 4 call sites of this function throughout the driver:
>  * e1000_clean_tx_ring(). Slowpath, process context, cleans the
>    whole Tx ring on ifdown. Use budget of 0 here;
>  * e1000_tx_map(). Hotpath, net Tx softirq, unmaps the buffers in
>    case of error. Use 0 as well;
>  * e1000_clean_tx_irq(). Hotpath, NAPI Tx completion polling cycle.
>    As the driver doesn't count completed Tx entries towards the NAPI
>    budget, just use the poll budget of 64 to utilize caches.
> 
> Apart from being a preparation for switching to napi_build_skb(), this is
> useful on its own as well, as napi_consume_skb() flushes skb caches by
> batches of 32 instead of one-at-a-time.
> 
> Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



WARNING: multiple messages have this Message-ID (diff)
From: Brelinski, Tony <tony.brelinski@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next 1/9] e1000: switch to napi_consume_skb()
Date: Tue, 28 Dec 2021 00:06:37 +0000	[thread overview]
Message-ID: <DM6PR11MB4218AFE1E9E4DD604693DFBC82439@DM6PR11MB4218.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211123171840.157471-2-alexandr.lobakin@intel.com>

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Alexander Lobakin
> Sent: Tuesday, November 23, 2021 9:19 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: netdev at vger.kernel.org; linux-kernel at vger.kernel.org; Jakub Kicinski
> <kuba@kernel.org>; David S. Miller <davem@davemloft.net>
> Subject: [Intel-wired-lan] [PATCH net-next 1/9] e1000: switch to
> napi_consume_skb()
> 
> In order to take the best from per-cpu NAPI skbuff_head caches and CPU
> cycles, let's switch from dev_kfree_skb_any(), which passes skb back to the
> mm layer, to napi_consume_skb(), which feeds those caches on non-zero
> budget instead (falls back to the former on 0).
> Do the replacement in e1000_unmap_and_free_tx_resource(). There are
> 4 call sites of this function throughout the driver:
>  * e1000_clean_tx_ring(). Slowpath, process context, cleans the
>    whole Tx ring on ifdown. Use budget of 0 here;
>  * e1000_tx_map(). Hotpath, net Tx softirq, unmaps the buffers in
>    case of error. Use 0 as well;
>  * e1000_clean_tx_irq(). Hotpath, NAPI Tx completion polling cycle.
>    As the driver doesn't count completed Tx entries towards the NAPI
>    budget, just use the poll budget of 64 to utilize caches.
> 
> Apart from being a preparation for switching to napi_build_skb(), this is
> useful on its own as well, as napi_consume_skb() flushes skb caches by
> batches of 32 instead of one-at-a-time.
> 
> Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
>  drivers/net/ethernet/intel/e1000/e1000_main.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Tested-by: Tony Brelinski <tony.brelinski@intel.com>



  reply	other threads:[~2021-12-28  0:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 17:18 [PATCH net-next 0/9] intel: switch to napi_build_skb() Alexander Lobakin
2021-11-23 17:18 ` [Intel-wired-lan] " Alexander Lobakin
2021-11-23 17:18 ` [PATCH net-next 1/9] e1000: switch to napi_consume_skb() Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-28  0:06   ` Brelinski, Tony [this message]
2021-12-28  0:06     ` Brelinski, Tony
2021-11-23 17:18 ` [PATCH net-next 2/9] e1000: switch to napi_build_skb() Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-28  0:07   ` Brelinski, Tony
2021-12-28  0:07     ` Brelinski, Tony
2021-11-23 17:18 ` [PATCH net-next 3/9] i40e: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-03 14:44   ` G, GurucharanX
2021-12-03 14:44     ` G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 4/9] iavf: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-14 12:50   ` Jankowski, Konrad0
2021-12-14 12:50     ` Jankowski, Konrad0
2021-11-23 17:18 ` [PATCH net-next 5/9] ice: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-07 10:03   ` G, GurucharanX
2021-12-07 10:03     ` G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 6/9] igb: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-22  3:45   ` G, GurucharanX
2021-12-22  3:45     ` G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 7/9] igc: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-08  8:15   ` Kraus, NechamaX
2021-12-08  8:15     ` Kraus, NechamaX
2021-11-23 17:18 ` [PATCH net-next 8/9] ixgbe: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-03 14:45   ` G, GurucharanX
2021-12-03 14:45     ` G, GurucharanX
2021-11-23 17:18 ` [PATCH net-next 9/9] ixgbevf: " Alexander Lobakin
2021-11-23 17:18   ` [Intel-wired-lan] " Alexander Lobakin
2021-12-12 13:47   ` Jankowski, Konrad0
2021-12-12 13:47     ` Jankowski, Konrad0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB4218AFE1E9E4DD604693DFBC82439@DM6PR11MB4218.namprd11.prod.outlook.com \
    --to=tony.brelinski@intel.com \
    --cc=alexandr.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.