[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <820dd18d-21a9-4c0d-ad92-021dc9b782b4@app.fastmail.com>
Date: Mon, 04 Dec 2023 21:06:53 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Christophe JAILLET" <christophe.jaillet@...adoo.fr>,
"Arnd Bergmann" <arnd@...nel.org>, "Yisen Zhuang" <yisen.zhuang@...wei.com>,
"Salil Mehta" <salil.mehta@...wei.com>,
"David S . Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>
Cc: "Jijie Shao" <shaojijie@...wei.com>, "Hao Chen" <chenhao418@...wei.com>,
Netdev <netdev@...r.kernel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri()
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
Powered by blists - more mailing lists