From: "Arnd Bergmann" <arnd@arndb.de>
To: "Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Arnd Bergmann" <arnd@kernel.org>,
"Yisen Zhuang" <yisen.zhuang@huawei.com>,
"Salil Mehta" <salil.mehta@huawei.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>
Cc: "Jijie Shao" <shaojijie@huawei.com>,
"Hao Chen" <chenhao418@huawei.com>,
Netdev <netdev@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri()
Date: Mon, 04 Dec 2023 21:06:53 +0100 [thread overview]
Message-ID: <820dd18d-21a9-4c0d-ad92-021dc9b782b4@app.fastmail.com> (raw)
In-Reply-To: <8f5f9a4b-f809-44cb-8f26-05e39b29dfb6@wanadoo.fr>
On Mon, Dec 4, 2023, at 19:54, Christophe JAILLET wrote:
> Le 04/12/2023 à 09:57, Arnd Bergmann a écrit :
>>
>> Use dynamic allocation for the largest stack object instead. It
>> would be nice to rewrite this file to completely avoid the extra
>> buffer and just use the one that was already allocated by debugfs,
>> but that is a much larger change.
>>
> could :
> pos += scnprintf(buf + pos, len - pos, "%s", <something>);
> be more widely used to avoid the alloc()/free() + copy of strings?
Yes, I think that would help, but this is beyond what I trust
myself to do blindly.
Arnd
prev parent reply other threads:[~2023-12-04 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 8:57 Arnd Bergmann
2023-12-04 14:50 ` Jijie Shao
2023-12-06 3:23 ` Jakub Kicinski
2023-12-04 18:54 ` Christophe JAILLET
2023-12-04 20:06 ` Arnd Bergmann [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=820dd18d-21a9-4c0d-ad92-021dc9b782b4@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=chenhao418@huawei.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@huawei.com \
--cc=yisen.zhuang@huawei.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
all inboxes | Powered by JetHome®