Skip to contentSkip to conversation

intelfb stack usage

DISCUSSION Randy.Dunlap 3 participants 3 messages Dec 17, 2004 – Dec 19, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

In 2.6.10-rc3-bk6, intelfb_set_par() has the distinction of being the largest stack user as determined by 'make checkstack':

objdump -d vmlinux $(find . -name '*.ko') | \
perl /mnt/src/linux-2610-rc3-bk6/scripts/checkstack.pl i386
0x00001317 intelfb_set_par: 2404

because it has this large struct on the stack:

	struct intelfb_hwstate hw;

(almost 2400 bytes)

Any suggestions for how to alleviate this large stack usage?

From a quick look, this is called from fb_ioctl() to fb_set_var() to fb_set_par().
fb_ioctl() does acquire_console_sem(), so using kmalloc() here would need to use GFP_ATOMIC...
I can do that if it's desired & acceptable.

Signature · 7 lines
~Randy


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
#1 lore raw
Quoted 11 lines · Randy.Dunlap

In 2.6.10-rc3-bk6, intelfb_set_par() has the distinction of being the largest stack user as determined by 'make checkstack':

objdump -d vmlinux $(find . -name '*.ko') | \
perl /mnt/src/linux-2610-rc3-bk6/scripts/checkstack.pl i386
0x00001317 intelfb_set_par: 2404

because it has this large struct on the stack:

	struct intelfb_hwstate hw;

(almost 2400 bytes)

Quoted 7 lines

Any suggestions for how to alleviate this large stack usage?

From a quick look, this is called from fb_ioctl() to fb_set_var()
to fb_set_par().
fb_ioctl() does acquire_console_sem(), so using kmalloc() here would need to use GFP_ATOMIC...
I can do that if it's desired & acceptable.

Using kmalloc() should be acceptable. I'll CC the author.

Tony

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

#2 lore raw

If you can do it, thanks. I won't have any time until next year.

Sylvain

Quoted 31 lines · Antonino A. Daplas
Quoted 11 lines · Randy.Dunlap

In 2.6.10-rc3-bk6, intelfb_set_par() has the distinction of being the largest stack user as determined by 'make checkstack':

objdump -d vmlinux $(find . -name '*.ko') | \
perl /mnt/src/linux-2610-rc3-bk6/scripts/checkstack.pl i386
0x00001317 intelfb_set_par: 2404

because it has this large struct on the stack:

	struct intelfb_hwstate hw;

(almost 2400 bytes)

Quoted 9 lines

Any suggestions for how to alleviate this large stack usage?

From a quick look, this is called from fb_ioctl() to fb_set_var() to fb_set_par().
fb_ioctl() does acquire_console_sem(), so using kmalloc() here would need to use GFP_ATOMIC...
I can do that if it's desired & acceptable.

Using kmalloc() should be acceptable. I'll CC the author.

Tony

Quoted 11 lines

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/