From: Jason Gunthorpe <jgg@ziepe.ca>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Tariq Toukan <tariqt@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
Boris Pismenny <borisp@mellanox.com>,
Ilya Lesokhin <ilyal@mellanox.com>,
Moshe Shemesh <moshe@mellanox.com>,
Kamal Heib <kamalh@mellanox.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/mlx5e: fix high stack usage
Date: Fri, 2 Nov 2018 10:08:58 -0600 [thread overview]
Message-ID: <20181102160858.GA17096@ziepe.ca> (raw)
In-Reply-To: <20181102153316.1492515-1-arnd@arndb.de>
On Fri, Nov 02, 2018 at 04:33:03PM +0100, Arnd Bergmann wrote:
> A patch that looks harmless causes the stack usage of the mlx5e_grp_sw_update_stats()
> function to drastically increase with x86 gcc-4.9 and higher (tested up to 8.1):
>
> drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function ‘mlx5e_grp_sw_update_stats’:
> drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:216:1: warning: the frame size of 1276 bytes is larger than 500 bytes [-Wframe-larger-than=]
Why is the stack size so big here? The mlx5e_sw_stats is < 500 bytes
and all the other on-stack stuff looks pretty small?
> By splitting out the loop body into a non-inlined function, the stack size goes
> back down to under 500 bytes.
Does this actually reduce the stack consumed or does this just suppress
the warning?
Jason
next prev parent reply other threads:[~2018-11-02 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 15:33 [PATCH] net/mlx5e: fix high stack usage Arnd Bergmann
2018-11-02 16:08 ` Jason Gunthorpe [this message]
2018-11-02 16:23 ` Arnd Bergmann
2018-11-02 17:00 ` Jason Gunthorpe
2018-11-02 21:05 ` Saeed Mahameed
2018-11-02 21:39 ` Eric Dumazet
2018-11-02 22:07 ` Saeed Mahameed
2018-11-02 22:15 ` Arnd Bergmann
2018-11-03 0:52 ` Saeed Mahameed
2018-11-02 22:15 ` Jason Gunthorpe
2018-11-03 0:37 ` Saeed Mahameed
2018-11-05 11:24 ` David Laight
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=20181102160858.GA17096@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=arnd@arndb.de \
--cc=borisp@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=ilyal@mellanox.com \
--cc=kamalh@mellanox.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=moshe@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.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).