From: Heiko Carstens <hca@linux.ibm.com>
To: Wenjia Zhang <wenjia@linux.ibm.com>
Cc: I Hsin Cheng <richard120310@gmail.com>,
alibuda@linux.alibaba.com, jaka@linux.ibm.com,
mjambigi@linux.ibm.com, sidraya@linux.ibm.com,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, linux-rdma@vger.kernel.org,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, skhan@linuxfoundation.org,
jserv@ccns.ncku.edu.tw, linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH] net/smc: Reduce size of smc_wr_tx_tasklet_fn
Date: Mon, 17 Mar 2025 14:56:31 +0100 [thread overview]
Message-ID: <20250317135631.21754E85-hca@linux.ibm.com> (raw)
In-Reply-To: <66ce34a0-b79d-4ef0-bdd5-982e139571f1@linux.ibm.com>
On Mon, Mar 17, 2025 at 12:22:46PM +0100, Wenjia Zhang wrote:
>
>
> On 15.03.25 07:25, I Hsin Cheng wrote:
> > The variable "polled" in smc_wr_tx_tasklet_fn is a counter to determine
> > whether the loop has been executed for the first time. Refactor the type
> > of "polled" from "int" to "bool" can reduce the size of generated code
> > size by 12 bytes shown with the test below
> >
> > $ ./scripts/bloat-o-meter vmlinux_old vmlinux_new
> > add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-12 (-12)
> > Function old new delta
> > smc_wr_tx_tasklet_fn 1076 1064 -12
> > Total: Before=24795091, After=24795079, chg -0.00%
> >
> > In some configuration, the compiler will complain this function for
> > exceeding 1024 bytes for function stack, this change can at least reduce
> > the size by 12 bytes within manner.
> >
> The code itself looks good. However, I’m curious about the specific
> situation where the compiler complained. Also, compared to exceeding the
> function stack limit by 1024 bytes, I don’t see how saving 12 bytes would
> bring any significant benefit.
The patch description doesn't make sense: bloat-a-meter prints the _text
size_ difference of two kernels, which really has nothing to do with
potential stack size savings.
If there are any changes in stack size with this patch is unknown; at least
if you rely only on the patch description.
You may want to have a look at scripts/stackusage and scripts/stackdelta.
next prev parent reply other threads:[~2025-03-17 13:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-15 6:25 [PATCH] net/smc: Reduce size of smc_wr_tx_tasklet_fn I Hsin Cheng
2025-03-17 1:34 ` Dust Li
2025-03-17 11:22 ` Wenjia Zhang
2025-03-17 13:56 ` Heiko Carstens [this message]
2025-03-18 8:43 ` Wenjia Zhang
2025-03-19 2:42 ` I Hsin Cheng
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=20250317135631.21754E85-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=guwen@linux.alibaba.com \
--cc=horms@kernel.org \
--cc=jaka@linux.ibm.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richard120310@gmail.com \
--cc=sidraya@linux.ibm.com \
--cc=skhan@linuxfoundation.org \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.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).