From: "Krzysztof Wilczyński" <kw@linux.com>
To: Alexander Lobakin <alobakin@pm.me>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Jingoo Han <jingoohan1@gmail.com>,
Gustavo Pimentel <gustavo.pimentel@synopsys.com>,
Rob Herring <robh@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] PCI: dwc: put struct dw_pcie::{ep,pp} into a union to reduce its size
Date: Wed, 24 Mar 2021 02:31:42 +0100 [thread overview]
Message-ID: <YFqWftATEbuxsJbn@rocinante> (raw)
In-Reply-To: <20210312140116.9453-1-alobakin@pm.me>
Hi Alexander,
Thank you for sending the patch over!
> A single dw_pcie entity can't be a root complex and an endpoint at
> the same time.
Nice catch!
A small nitpick: this would be Root Complex and Endpoint, as it's
customary to capitalise these.
Also, if you could capitalise the subject line - it could also perhaps
be simplified to something like, for example:
Optimize struct dw_pcie to reduce its size
Feel free to ignore both suggestions, as these are just nitpicks.
> We can use this to reduce the size of dw_pcie by 80, from 280 to 200
> bytes (on x32, guess more on x64), by putting the related embedded
> structures (struct pcie_port and struct dw_pcie_ep) into a union.
[...]
> - struct pcie_port pp;
> - struct dw_pcie_ep ep;
> + union {
> + struct pcie_port pp;
> + struct dw_pcie_ep ep;
> + };
[...]
How did you measure the difference? Often, people include pahole output
for the "before" and "after", so to speak, to showcase the difference
and/or improvement. Do you have something like that handy?
Krzysztof
next prev parent reply other threads:[~2021-03-24 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 14:01 [PATCH RESEND] PCI: dwc: put struct dw_pcie::{ep,pp} into a union to reduce its size Alexander Lobakin
2021-03-24 1:31 ` Krzysztof Wilczyński [this message]
2021-03-24 11:33 ` Alexander Lobakin
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=YFqWftATEbuxsJbn@rocinante \
--to=kw@linux.com \
--cc=alobakin@pm.me \
--cc=bhelgaas@google.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh@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.