From: "Arnd Bergmann" <arnd@arndb.de>
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"kernel test robot" <lkp@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
"Linus Walleij" <linus.walleij@linaro.org>,
Linux-OMAP <linux-omap@vger.kernel.org>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
dri-devel@lists.freedesktop.org
Subject: Re: drivers/gpu/drm/omapdrm/dss/dsi.c:1126:1: warning: the frame size of 1060 bytes is larger than 1024 bytes
Date: Fri, 16 Sep 2022 10:52:46 +0200 [thread overview]
Message-ID: <e020ff7a-d58e-481d-bb1c-980fe5e13c3e@www.fastmail.com> (raw)
In-Reply-To: <6c0d4973-7f7e-1893-58b2-9bbe19160045@ideasonboard.com>
On Fri, Sep 16, 2022, at 10:24 AM, Tomi Valkeinen wrote:
> On 15/09/2022 21:49, Arnd Bergmann wrote:
>> On Thu, Sep 15, 2022, at 8:17 PM, kernel test robot wrote:
>> I think hte problem is that struct dsi_irq_stats is just too
>> large, at 776 bytes. The interrupts are disabled during a copy
>> from 'dsi->irq_stats' into 'stats'. A trivial workaround would
>> avoid the local copy and keep interrupts disabled through
>> the entire function so it can operate directly on the source
>> data, but that would introduce a longer time with irqs disabled,
>> which might be bad as well.
>>
>> Since this is only called from a debugfs file, and reading that
>> file is probably not performance critical itself, maybe
>> using kmalloc on the large structure would be best.
>
> I think that makes sense. I have sent a patch using kmalloc.
>
> Oddly enough, I was not able to reproduce the warning with my normal
> toolchain, gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf. I even
> reduced the frame size limit to 700, and saw warnings from other places,
> but not from omapdrm.
I had another look and found that this only happens with
CONFIG_INIT_STACK_ALL_PATTERN=y or CONFIG_INIT_STACK_ALL_ZERO=y,
which are only available with gcc-12.x or clang.
It looks like without that, gcc can reduce the size of the
on-stack variable by only copying the members that it actually
needs, see https://pastebin.com/8dDRE1bX for the gcc-11
output.
Arnd
prev parent reply other threads:[~2022-09-16 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 18:17 kernel test robot
2022-09-15 18:49 ` Arnd Bergmann
2022-09-16 8:24 ` Tomi Valkeinen
2022-09-16 8:52 ` 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=e020ff7a-d58e-481d-bb1c-980fe5e13c3e@www.fastmail.com \
--to=arnd@arndb.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=lkp@intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tomi.valkeinen@ti.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®