tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel stack usage



I've fixed several where I felt comfortable, feel free to do more:
4096    pci_conf_print at pci_subr.c:4812
4096    dtv_demux_read at dtv_demux.c:493
3408    genfb_calc_hsize at genfb.c:630
2240    bwfm_rx_event_cb at bwfm.c:2099
1664    wdcprobe_with_reset at wdc.c:491

Jaromir

Le sam. 30 mai 2020 à 16:18, Christos Zoulas <christos%astron.com@localhost> a écrit :
>
> In article <20200530095218.GB28002%mail.duskware.de@localhost>,
> Martin Husemann  <martin%duskware.de@localhost> wrote:
> >Hey folks,
> >
> >triggered by some experiments simonb did on mips I wrote a script to find
> >the functions using the bigest stack frame in my current sparc64 kernel.
> >
> >The top 15 list is:
> >
> >Frame/b Function
> >4096    pci_conf_print at pci_subr.c:4812
> >4096    dtv_demux_read at dtv_demux.c:493
> >3536    SHA3_Selftest at sha3.c:430
> >3408    genfb_calc_hsize at genfb.c:630
> >3248    radeonfb_pickres at radeonfb.c:4127
> >2304    radeonfb_set_cursor at radeonfb.c:3690
> >2272    gem_pci_attach at if_gem_pci.c:147
> >2256    twoway_memmem at memmem.c:84
> >2240    bwfm_rx_event_cb at bwfm.c:2099
> >2240    compat_60_ptmget_ioctl at tty_60.c:70
> >2112    db_stack_trace_print at db_trace.c:77
> >1664    wdcprobe_with_reset at wdc.c:491
> >1424    nfsrv_rename at nfs_serv.c:1906
> >1408    OF_mapintr at ofw_machdep.c:728
> >1344    sysctl_hw_firmware_path at firmload.c:81
> >1280    fw_bmr at firewire.c:2296
> >1264    cdioctl at cd.c:1204
> >1248    cpu_reset_fpustate at cpu.c:400
> >1248    aubtfwl_attach_hook at aubtfwl.c:273
> >1248    uvm_swap_stats at uvm_swap.c:726
> >
> >(left column is size of the frame on sparc64 in bytes)
> >
> >I think anything > 1k is dubious and should be checked.
>
> I agree, here is the same for x86_64/GENERIC...
>
> 4408 ffffffff8027af14:pci_conf_print+0xd
> 4128 ffffffff80a8dca0:dtv_demux_read+0xb
> 3352 ffffffff80b940bb:procfs_domounts+0xd
> 3272 ffffffff80e36b4b:SHA3_Selftest+0xd
> 3264 ffffffff80c677da:coredump_note_elf64+0xb
> 3240 ffffffff80b537c6:genfb_calc_hsize.isra.0+0x5
> 2704 ffffffff80c66a88:coredump_note_elf32+0xb
> 2408 ffffffff80227a71:process_machdep_doxstate+0xd
> 2184 ffffffff804381fd:linux_ioctl_termios+0xd
> 2168 ffffffff80440b2d:linux32_ioctl_termios+0xd
> 2112 ffffffff802c5579:gem_pci_attach+0xb
> 2104 ffffffff80e465c3:twoway_memmem+0xd
> 2088 ffffffff806b5c18:bwfm_rx_event_cb+0xd
> 2072 ffffffff8097e221:compat_60_ptmget_ioctl+0xd
> 2064 ffffffff8053ce72:db_stack_trace_print+0x11
> 1488 ffffffff8064f943:wdcprobe_with_reset+0xb
> 1384 ffffffff80d7ee2b:ipmi_match+0x9
> 1328 ffffffff80467a95:usb_add_event+0x7
> 1304 ffffffff80ba85bb:nfsrv_rename+0xd
> 1256 ffffffff8053069f:acpicpu_md_pstate_sysctl_all+0xd
> 1256 ffffffff8052cd13:acpicpu_start+0x9
> 1240 ffffffff8043b162:linux_sys_rt_sigreturn+0x9
> 1192 ffffffff80b9392a:procfs_do_pid_stat+0xd
> 1176 ffffffff80d70810:sysctl_hw_firmware_path+0xd
> 1160 ffffffff807b30a3:radeon_cs_ioctl+0xd
> 1128 ffffffff8044610f:oss_ioctl_mixer+0xd
> 1128 ffffffff8024dd3c:cdioctl+0xd
> 1112 ffffffff80c633ca:uvm_swap_stats.part.1+0xd
> 1104 ffffffff804fdf59:fw_bmr+0xb
> 1096 ffffffff80c8c0ab:ktrwrite+0xd
> 1080 ffffffff80573ca6:ahc_print_register+0xd
> 1080 ffffffff80550de8:procfs_getonecpu+0xd
> 1080 ffffffff8048d95e:aubtfwl_attach_hook+0x9
> 1064 ffffffff80cf925d:proc_regio+0xd
> 1064 ffffffff80ccb407:bufq_alloc+0xd
> 1064 ffffffff80ae8090:ar5112SetPowerTable+0xd
> 1064 ffffffff80582aa0:ahd_print_register+0xd
> 1064 ffffffff80568a53:tpmread+0xd
> 1064 ffffffff80382262:txp_attach+0xd
> 1064 ffffffff802636da:ata_probe_caps+0xd
> 1048 ffffffff80e06097:ar9003_paprd_tx_tone_done+0xd
> 1048 ffffffff80d87e9b:sdl_print+0x9
> 1048 ffffffff80c67604:coredump_getseghdrs_elf64+0xd
>
>


Home | Main Index | Thread Index | Old Index