* linux-next: kgdb tree build warning
@ 2009-12-23 23:48 Stephen Rothwell
2009-12-24 4:09 ` Jason Wessel
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-12-23 23:48 UTC (permalink / raw)
To: Jason Wessel; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
Hi Jason,
Today's linux-next build (x86_64_allmodconfig) produced this warning:
kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp':
kernel/debug/kdb/kdb_bp.c:434: warning: the frame size of 32880 bytes is larger than 2048 bytes
Introduced by commit 16f40ed7bd0ad29dcde7a05b8a07f5ba10937277 ("kdb: core
for kgdb back end").
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: kgdb tree build warning
2009-12-23 23:48 linux-next: kgdb tree build warning Stephen Rothwell
@ 2009-12-24 4:09 ` Jason Wessel
2009-12-24 5:21 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Jason Wessel @ 2009-12-24 4:09 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel
Stephen Rothwell wrote:
> Hi Jason,
>
> Today's linux-next build (x86_64_allmodconfig) produced this warning:
>
> kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp':
> kernel/debug/kdb/kdb_bp.c:434: warning: the frame size of 32880 bytes is larger than 2048 bytes
>
> Introduced by commit 16f40ed7bd0ad29dcde7a05b8a07f5ba10937277 ("kdb: core
> for kgdb back end").
>
>
Using gcc 4.3, I did not see this error. What compiler or compiler
options did you use to get this?
I assume it means the stack space was exhausted and a casual glance at
the code did not yield anything obvious like a large array on the stack
or anything. It is conceivable that there is an inline function that is
the source of the problem, but I would like to be able to duplicate it.
Thanks,
Jason.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: kgdb tree build warning
2009-12-24 4:09 ` Jason Wessel
@ 2009-12-24 5:21 ` Stephen Rothwell
2009-12-24 14:44 ` Jason Wessel
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2009-12-24 5:21 UTC (permalink / raw)
To: Jason Wessel; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1469 bytes --]
Hi Jason,
On Wed, 23 Dec 2009 22:09:00 -0600 Jason Wessel <jason.wessel@windriver.com> wrote:
>
> Stephen Rothwell wrote:
> >
> > Today's linux-next build (x86_64_allmodconfig) produced this warning:
> >
> > kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp':
> > kernel/debug/kdb/kdb_bp.c:434: warning: the frame size of 32880 bytes is larger than 2048 bytes
> >
> > Introduced by commit 16f40ed7bd0ad29dcde7a05b8a07f5ba10937277 ("kdb: core
> > for kgdb back end").
>
> Using gcc 4.3, I did not see this error. What compiler or compiler
> options did you use to get this?
I use a gcc 4.4.0 cross sompiler for all the x86_64 builds. No special
compiler options apart from those provided by the allmodconfig build.
It looks like the compiler gets -Wframe-larger-than=${CONFIG_FRAME_WARN}
passed to it (and presumably CONFIG_FRAME_WARN is 2048).
> I assume it means the stack space was exhausted and a casual glance at
> the code did not yield anything obvious like a large array on the stack
> or anything. It is conceivable that there is an inline function that is
> the source of the problem, but I would like to be able to duplicate it.
OK.
That function has a kdb_bp_t on its stack which contains an NR_CPUS array
of pointers. NR_CPUS is 4096 (in this build) and pointers are 8 bytes,
so there is 32K right there :-(
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: kgdb tree build warning
2009-12-24 5:21 ` Stephen Rothwell
@ 2009-12-24 14:44 ` Jason Wessel
0 siblings, 0 replies; 4+ messages in thread
From: Jason Wessel @ 2009-12-24 14:44 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Martin Hicks
Stephen Rothwell wrote:
> Hi Jason,
>
> On Wed, 23 Dec 2009 22:09:00 -0600 Jason Wessel <jason.wessel@windriver.com> wrote:
>
>> Stephen Rothwell wrote:
>>
>>> Today's linux-next build (x86_64_allmodconfig) produced this warning:
>>>
>>> kernel/debug/kdb/kdb_bp.c: In function 'kdb_bp':
>>> kernel/debug/kdb/kdb_bp.c:434: warning: the frame size of 32880 bytes is larger than 2048 bytes
>>>
>>>
> That function has a kdb_bp_t on its stack which contains an NR_CPUS array
> of pointers. NR_CPUS is 4096 (in this build) and pointers are 8 bytes,
> so there is 32K right there :-(
>
>
Thank you for the details. I see that I can see the same problem if I
set CONFIG_MAXSMP and use CONFIG_FRAME_WARN=2048. It also allowed me to
test that the problem is really fixed. :-)
I had talked with Martin a while back and he gave me some patches which
cleaned up the breakpoint code (kdb_bp.c). The hw breakpoint support
was implemented a different way in the new kdb/kgdb. You stumbled upon
something that was intended to already be removed from the source.
As a side point you pointed me to an area where I could remove some
other code that should not be there because the debug core is already
handling the operations. The net result is this problem is fixed, and 2
more variables are gone out of that struct.
- int bp_cpu; /* Cpu # (if bp_global == 0) */
- kdbhard_bp_t *bp_hard[NR_CPUS]; /* Hardware breakpoint
structure */
- int bp_adjust; /* Adjustment to PC for real
- * instruction */
Thanks,
Jason.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-24 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 23:48 linux-next: kgdb tree build warning Stephen Rothwell
2009-12-24 4:09 ` Jason Wessel
2009-12-24 5:21 ` Stephen Rothwell
2009-12-24 14:44 ` Jason Wessel
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).