linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: anant.thazhemadam@gmail.com
Cc: hawk@kernel.org, daniel@iogearbox.net, mst@redhat.com,
	netdev@vger.kernel.org, jasowang@redhat.com,
	john.fastabend@gmail.com, ast@kernel.org,
	virtualization@lists.linux-foundation.org, kuba@kernel.org,
	bpf@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Linux-kernel-mentees] [PATCH 0/2] reorder members of structures in virtio_net for optimization
Date: Fri, 02 Oct 2020 19:06:38 -0700 (PDT)	[thread overview]
Message-ID: <20201002.190638.1090456279017490485.davem@davemloft.net> (raw)
In-Reply-To: <20200930051722.389587-1-anant.thazhemadam@gmail.com>

From: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Date: Wed, 30 Sep 2020 10:47:20 +0530

> The structures virtnet_info and receive_queue have byte holes in 
> middle, and their members could do with some rearranging 
> (order-of-declaration wise) in order to overcome this.
> 
> Rearranging the members helps in:
>   * elimination the byte holes in the middle of the structures
>   * reduce the size of the structure (virtnet_info)
>   * have more members stored in one cache line (as opposed to 
>     unnecessarily crossing the cacheline boundary and spanning
>     different cachelines)
> 
> The analysis was performed using pahole.
> 
> These patches may be applied in any order.

What effects do these changes have on performance?

The cache locality for various TX and RX paths could be effected.

I'm not applying these patches without some data on the performance
impact.

Thank you.

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

  parent reply	other threads:[~2020-10-03  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30  5:17 [Linux-kernel-mentees] [PATCH 0/2] reorder members of structures in virtio_net for optimization Anant Thazhemadam
2020-09-30  5:17 ` [Linux-kernel-mentees] [PATCH 1/2] net: reorder members of virtnet_info " Anant Thazhemadam
2020-09-30  5:17 ` [Linux-kernel-mentees] [PATCH 2/2] net: reorder members of receive_queue in virtio_net " Anant Thazhemadam
2020-10-03  2:06 ` David Miller [this message]
2020-10-03 18:43   ` [Linux-kernel-mentees] [PATCH 0/2] reorder members of structures " Michael S. Tsirkin

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=20201002.190638.1090456279017490485.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=anant.thazhemadam@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hawk@kernel.org \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).