From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>
Subject: Re: [PATCH v2 net-next 0/7] Cleanup to main DSA structures
Date: Wed, 5 Jan 2022 19:22:58 +0000 [thread overview]
Message-ID: <20220105192257.cjnha6eyzcqp34bw@skbuf> (raw)
In-Reply-To: <cadbfac7-0f20-baaf-d559-d9fe62f08856@gmail.com>
On Wed, Jan 05, 2022 at 11:04:24AM -0800, Florian Fainelli wrote:
> On 1/5/22 10:59 AM, Vladimir Oltean wrote:
> > On Wed, Jan 05, 2022 at 10:39:04AM -0800, Florian Fainelli wrote:
> >> On 1/5/22 5:21 AM, Vladimir Oltean wrote:
> >>> This series contains changes that do the following:
> >>>
> >>> - struct dsa_port reduced from 576 to 544 bytes, and first cache line a
> >>> bit better organized
> >>> - struct dsa_switch from 160 to 136 bytes, and first cache line a bit
> >>> better organized
> >>> - struct dsa_switch_tree from 112 to 104 bytes, and first cache line a
> >>> bit better organized
> >>>
> >>> No changes compared to v1, just split into a separate patch set.
> >>
> >> This is all looking good to me. I suppose we could possibly swap the
> >> 'nh' and 'tag_ops' member since dst->tag_ops is used in
> >> dsa_tag_generic_flow_dissect() which is a fast path, what do you think?
> >
> > pahole is telling me that dst->tag_ops is in the first cache line on
> > both arm64 and arm32. Are you saying that it's better for it to take
> > dst->nh's place?
>
> Sorry it stuck in my head somehow based upon patch 7's pahole output
> that tag_ops was still in the second cache line when the after clearly
> shows that it moved to the first cache line. No need to add additional
> changes then, thanks!
Yes, that output is a bit verbose and small details are easy to miss
(adding --expand_types makes it even worse). Happened to me quite a few
times during the session...
I'll prepare a v3 once we figure out what would suffice in terms of
warning other developers about the lack of bit field atomicity.
prev parent reply other threads:[~2022-01-05 19:23 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-05 13:21 [PATCH v2 net-next 0/7] Cleanup to main DSA structures Vladimir Oltean
2022-01-05 13:21 ` [PATCH v2 net-next 1/7] net: dsa: move dsa_port :: stp_state near dsa_port :: mac Vladimir Oltean
2022-01-05 18:30 ` Florian Fainelli
2022-01-05 13:21 ` [PATCH v2 net-next 2/7] net: dsa: merge all bools of struct dsa_port into a single u8 Vladimir Oltean
2022-01-05 18:30 ` Florian Fainelli
2022-01-05 18:39 ` Vladimir Oltean
2022-01-05 18:46 ` Florian Fainelli
2022-01-05 18:56 ` Vladimir Oltean
2022-01-05 19:42 ` Florian Fainelli
2022-01-05 22:10 ` Andrew Lunn
2022-01-05 13:21 ` [PATCH v2 net-next 3/7] net: dsa: move dsa_port :: type near dsa_port :: index Vladimir Oltean
2022-01-05 18:31 ` Florian Fainelli
2022-01-05 13:21 ` [PATCH v2 net-next 4/7] net: dsa: merge all bools of struct dsa_switch into a single u32 Vladimir Oltean
2022-01-05 18:32 ` Florian Fainelli
2022-01-05 13:21 ` [PATCH v2 net-next 5/7] net: dsa: make dsa_switch :: num_ports an unsigned int Vladimir Oltean
2022-01-05 18:33 ` Florian Fainelli
2022-01-05 13:21 ` [PATCH v2 net-next 6/7] net: dsa: move dsa_switch_tree :: ports and lags to first cache line Vladimir Oltean
2022-01-05 18:34 ` Florian Fainelli
2022-01-05 13:21 ` [PATCH v2 net-next 7/7] net: dsa: combine two holes in struct dsa_switch_tree Vladimir Oltean
2022-01-05 18:34 ` Florian Fainelli
2022-01-05 14:28 ` [PATCH v2 net-next 0/7] Cleanup to main DSA structures Vladimir Oltean
2022-01-05 18:37 ` Florian Fainelli
2022-01-05 18:39 ` Florian Fainelli
2022-01-05 18:59 ` Vladimir Oltean
2022-01-05 19:04 ` Florian Fainelli
2022-01-05 19:22 ` Vladimir Oltean [this message]
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=20220105192257.cjnha6eyzcqp34bw@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
/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).