From: Arnd Bergmann <arnd@arndb.de>
To: Gustavo Pimentel <Gustavo.Pimentel@synopsys.com>
Cc: Vinod Koul <vkoul@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Joao Pinto <Joao.Pinto@synopsys.com>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: dw-edma: fix unnecessary stack usage
Date: Fri, 21 Jun 2019 11:05:11 +0200 [thread overview]
Message-ID: <CAK8P3a3TE2hu=gjyf5gVj3HufVacFSoc4WjOVpgP3bz0LBbGKQ@mail.gmail.com> (raw)
In-Reply-To: <DM6PR12MB401006CA0446C71E36786E75DAE70@DM6PR12MB4010.namprd12.prod.outlook.com>
On Fri, Jun 21, 2019 at 10:21 AM Gustavo Pimentel
<Gustavo.Pimentel@synopsys.com> wrote:
> On Mon, Jun 17, 2019 at 14:16:45, Arnd Bergmann <arnd@arndb.de> wrote:
>
> > Putting large constant data on the stack causes unnecessary overhead
> > and stack usage:
> >
> > drivers/dma/dw-edma/dw-edma-v0-debugfs.c:285:6: error: stack frame size of 1376 bytes in function 'dw_edma_v0_debugfs_on' [-Werror,-Wframe-larger-than=]
>
> I had that warning at the beginning of the development, that's why I
> divided the debugfs entries into several subfunctions. Perhaps my
> configuration has configured a bigger stack frame size than your
> configuration.
I suspect the problem is CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE,
which is a farily new configuration option that has the unintended side-effect
of sometimes preventing the compiler combining local variables from functions
inlined into the caller. Adding 'noinline_for_stack' to the sub-functions would
have also prevented this, but I think just not having the strings on the
stack is better anyway.
Arnd
prev parent reply other threads:[~2019-06-21 9:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 13:16 [PATCH] dmaengine: dw-edma: fix unnecessary stack usage Arnd Bergmann
2019-06-21 8:21 ` Gustavo Pimentel
2019-06-21 9:05 ` 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='CAK8P3a3TE2hu=gjyf5gVj3HufVacFSoc4WjOVpgP3bz0LBbGKQ@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=Gustavo.Pimentel@synopsys.com \
--cc=Joao.Pinto@synopsys.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vkoul@kernel.org \
/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).