Re: 4k stacks in 2.6 [worst offenders]
From: Jörn Engel
Date: Tue Jun 01 2004 - 01:02:50 EST
On Wed, 26 May 2004 18:41:29 +0200, Jörn Engel wrote:
>
> Anyway, whether we go for 4k in 2.6 or not, we should do our best to
> fix bad code and I will go looking for some more so others can go and
> fix some more. There's still enough horror in mainline for more than
> one amusement park, we just haven't found it yet.
Here's some. My tool is still buggy, so if any results don't make
sense, please tell me. Full results are a bit verbose (2M), but
compress quite well, so I have them attached. For the lazy, here are
a few interesting things. First the recursions that shouldn't iterate
too often:
WARNING: recursion detected:
0 default_wake_function
36 try_to_wake_up
0 task_rq_unlock
0 preempt_schedule
68 schedule
52 load_balance
0 find_busiest_queue
0 double_lock_balance
0 __preempt_spin_lock
0 _raw_spin_lock
0 printk
0 printk
16 release_console_sem
16 __wake_up
0 __wait_queue->func
WARNING: recursion detected:
12 kfree
12 cache_flusharray
20 free_block
12 slab_destroy
0 kernel_map_pages
20 change_page_attr
12 __change_page_attr
16 split_large_page
0 alloc_pages_node
24 __alloc_pages
284 try_to_free_pages
0 backing_dev_info->congested_fn
0 dm_any_congested
0 dm_table_put
0 table_destroy
0 vfree
0 __vunmap
WARNING: recursion detected:
0 kernel_map_pages
20 change_page_attr
12 __change_page_attr
16 split_large_page
0 alloc_pages_node
24 __alloc_pages
284 try_to_free_pages
0 backing_dev_info->congested_fn
0 dm_any_congested
0 dm_table_put
0 table_destroy
0 vfree
0 __vunmap
0 __free_pages
0 free_hot_page
0 free_hot_cold_page
WARNING: recursion detected:
0 dm_table_any_congested
0 backing_dev_info->congested_fn
0 dm_any_congested
WARNING: recursion detected:
12 kmem_cache_free
12 cache_flusharray
20 free_block
12 slab_destroy
WARNING: recursion detected:
68 schedule
0 finish_task_switch
0 __put_task_struct
0 free_task
12 kfree
12 cache_flusharray
20 free_block
12 slab_destroy
0 kernel_map_pages
20 change_page_attr
12 __change_page_attr
16 split_large_page
0 alloc_pages_node
24 __alloc_pages
284 try_to_free_pages
12 shrink_caches
12 shrink_zone
124 shrink_cache
176 shrink_list
0 handle_write_error
0 lock_page
72 __lock_page
0 io_schedule
WARNING: recursion detected:
0 kmem_cache_alloc
16 cache_alloc_refill
36 cache_grow
0 alloc_slabmgmt
WARNING: recursion detected:
24 __alloc_pages
284 try_to_free_pages
12 shrink_caches
12 shrink_zone
124 shrink_cache
176 shrink_list
0 add_to_swap
0 __add_to_swap_cache
16 radix_tree_insert
0 radix_tree_node_alloc
0 kmem_cache_alloc
0 kmem_cache_alloc
16 cache_alloc_refill
36 cache_grow
0 kmem_getpages
0 __get_free_pages
0 alloc_pages_node
WARNING: recursion detected:
28 qla2x00_handle_port_rscn
28 qla2x00_send_login_iocb
0 qla2x00_issue_marker
28 qla2x00_marker
0 __qla2x00_marker
24 qla2x00_req_pkt
0 qla2x00_poll
28 qla2x00_intr_handler
100 qla2x00_async_event
WARNING: recursion detected:
0 qla2x00_process_iodesc
28 qla2x00_handle_port_rscn
28 qla2x00_send_login_iocb
0 qla2x00_issue_marker
28 qla2x00_marker
0 __qla2x00_marker
24 qla2x00_req_pkt
0 qla2x00_poll
28 qla2x00_intr_handler
100 qla2x00_async_event
0 qla2x00_process_response_queue
WARNING: recursion detected:
28 qla2x00_marker
0 __qla2x00_marker
24 qla2x00_req_pkt
0 qla2x00_poll
28 qla2x00_intr_handler
88 qla2x00_next
32 qla2x00_start_scsi
WARNING: recursion detected:
92 qla2x00_mailbox_command
40 qla2x00_abort_isp
24 qla2x00_restart_isp
24 qla2x00_setup_chip
96 qla2x00_verify_checksum
WARNING: recursion detected:
96 qla2x00_issue_iocb
92 qla2x00_mailbox_command
40 qla2x00_abort_isp
24 qla2x00_restart_isp
0 qla2x00_configure_loop
80 qla2x00_configure_fabric
0 qla2x00_rff_id
WARNING: recursion detected:
72 qla2x00_rsnn_nn
96 qla2x00_issue_iocb
92 qla2x00_mailbox_command
40 qla2x00_abort_isp
24 qla2x00_restart_isp
0 qla2x00_configure_loop
80 qla2x00_configure_fabric
WARNING: recursion detected:
16 acpi_ut_remove_reference
24 acpi_ut_update_object_reference
16 acpi_ut_update_ref_count
16 acpi_ut_delete_internal_obj
WARNING: recursion detected:
32 acpi_ex_field_datum_io
76 acpi_ex_insert_into_field
52 acpi_ex_write_with_update_rule
WARNING: recursion detected:
72 acpi_ex_extract_from_field
32 acpi_ex_field_datum_io
WARNING: recursion detected:
32 acpi_ex_read_data_from_field
72 acpi_ex_extract_from_field
32 acpi_ex_field_datum_io
32 acpi_ex_access_region
20 acpi_ex_setup_region
16 acpi_ds_get_region_arguments
28 acpi_ds_execute_arguments
24 acpi_ps_parse_aml
36 acpi_ps_parse_loop
0 acpi_walk_state->ascending_callback
24 acpi_ds_exec_end_op
40 acpi_ex_resolve_operands
20 acpi_ex_resolve_to_value
28 acpi_ex_resolve_object_to_value
WARNING: recursion detected:
28 acpi_ds_execute_arguments
24 acpi_ps_parse_aml
36 acpi_ps_parse_loop
0 acpi_walk_state->ascending_callback
24 acpi_ds_exec_end_op
40 acpi_ex_resolve_operands
20 acpi_ex_resolve_to_value
28 acpi_ex_resolve_object_to_value
16 acpi_ds_get_package_arguments
WARNING: recursion detected:
32 acpi_ex_resolve_node_to_value
32 acpi_ex_read_data_from_field
72 acpi_ex_extract_from_field
32 acpi_ex_field_datum_io
32 acpi_ex_access_region
20 acpi_ex_setup_region
16 acpi_ds_get_region_arguments
28 acpi_ds_execute_arguments
24 acpi_ps_parse_aml
36 acpi_ps_parse_loop
0 acpi_walk_state->ascending_callback
24 acpi_ds_exec_end_op
40 acpi_ex_resolve_operands
20 acpi_ex_resolve_to_value
WARNING: recursion detected:
28 acpi_ns_evaluate_by_handle
20 acpi_ns_get_object_value
32 acpi_ex_resolve_node_to_value
32 acpi_ex_read_data_from_field
72 acpi_ex_extract_from_field
32 acpi_ex_field_datum_io
32 acpi_ex_access_region
20 acpi_ex_setup_region
16 acpi_ds_get_region_arguments
28 acpi_ds_execute_arguments
24 acpi_ps_parse_aml
36 acpi_ps_parse_loop
0 acpi_walk_state->ascending_callback
24 acpi_ds_exec_end_op
32 acpi_ds_load2_end_op
20 acpi_ex_create_table_region
28 acpi_ev_initialize_region
36 acpi_ev_execute_reg_method
WARNING: recursion detected:
24 acpi_ps_parse_aml
36 acpi_ds_call_control_method
There are more, but this shows a few ugly spots. It also shows bugs
in my tool, I'll have to look into those. Next month.
Now some of the top stack killers:
stackframes for call path too long (3136):
size function
0 radeonfb_pci_resume
2576 radeonfb_set_par
0 preempt_schedule
68 schedule
0 __put_task_struct
0 audit_free
0 audit_log_end
12 audit_log_end_fast
12 netlink_unicast
76 netlink_attachskb
0 __kfree_skb
0 ip_conntrack_put
0 ip_conntrack_put
12 kfree
0 kernel_map_pages
20 change_page_attr
24 __alloc_pages
284 try_to_free_pages
0 out_of_memory
0 mmput
0 exit_aio
52 aio_cancel_all
0 list_kiocb
stackframes for call path too long (3056):
size function
720 ncp_ioctl
616 ncp_conn_logged_in
24 ncp_lookup_volume
0 ncp_request2
164 sock_sendmsg
0 wait_on_sync_kiocb
68 schedule
0 __put_task_struct
0 audit_free
0 audit_log_end
12 audit_log_end_fast
12 netlink_unicast
76 netlink_attachskb
0 __kfree_skb
0 ip_conntrack_put
0 ip_conntrack_put
12 kfree
0 kernel_map_pages
20 change_page_attr
24 __alloc_pages
284 try_to_free_pages
0 out_of_memory
0 mmput
0 exit_aio
0 __put_ioctx
16 do_munmap
0 fput
0 __fput
0 locks_remove_flock
0 panic
0 sys_sync
0 sync_inodes
308 sync_inodes_sb
0 do_writepages
128 mpage_writepages
4 write_boundary_block
0 ll_rw_block
28 submit_bh
0 bio_alloc
88 mempool_alloc
256 wakeup_bdflush
20 pdflush_operation
0 printk
16 release_console_sem
16 __wake_up
0 printk
0 vscnprintf
32 vsnprintf
112 number
stackframes for call path too long (3024):
size function
0 acpi_device_ops->bind
292 acpi_pci_bind
292 acpi_pci_irq_add_prt
20 acpi_get_irq_routing_table
20 acpi_rs_get_prt_method_data
24 acpi_ut_evaluate_object
32 acpi_ns_evaluate_relative
28 acpi_ns_evaluate_by_handle
20 acpi_ns_get_object_value
32 acpi_ex_resolve_node_to_value
32 acpi_ex_read_data_from_field
72 acpi_ex_extract_from_field
32 acpi_ex_field_datum_io
32 acpi_ex_access_region
20 acpi_ex_setup_region
16 acpi_ds_get_region_arguments
28 acpi_ds_execute_arguments
24 acpi_ps_parse_aml
36 acpi_ds_call_control_method
24 acpi_ps_parse_aml
36 acpi_ps_parse_loop
24 acpi_ds_exec_end_op
32 acpi_ds_load2_end_op
20 acpi_ex_create_table_region
24 acpi_tb_find_table
224 acpi_get_firmware_table
68 acpi_tb_get_table
24 acpi_tb_get_table_body
36 acpi_tb_table_override
36 acpi_tb_get_this_table
0 acpi_os_map_memory
0 __ioremap
0 __pmd_alloc
0 preempt_schedule
68 schedule
0 __put_task_struct
0 audit_free
0 audit_log_end
12 audit_log_end_fast
12 netlink_unicast
76 netlink_attachskb
0 __kfree_skb
0 ip_conntrack_put
0 ip_conntrack_put
12 kfree
0 kernel_map_pages
20 change_page_attr
24 __alloc_pages
284 try_to_free_pages
0 out_of_memory
0 mmput
0 exit_aio
0 __put_ioctx
16 do_munmap
0 fput
0 __fput
0 locks_remove_flock
0 panic
0 sys_sync
0 sync_inodes
308 sync_inodes_sb
0 do_writepages
128 mpage_writepages
4 write_boundary_block
0 ll_rw_block
28 submit_bh
0 bio_alloc
88 mempool_alloc
256 wakeup_bdflush
20 pdflush_operation
0 printk
0 preempt_schedule
68 schedule
stackframes for call path too long (3104):
size function
0 client_reg_t->event_handler
1168 ide_config
12 ide_register_hw
1596 ide_unregister
0 device_unregister
0 device_del
0 kobject_del
0 kobject_hotplug
132 call_usermodehelper
80 wait_for_completion
68 schedule
0 __put_task_struct
0 audit_free
16 audit_filter_syscall
32 audit_filter_rules
stackframes for call path too long (3144):
size function
148 generic_ide_ioctl
12 ide_register_hw
1596 ide_unregister
0 device_unregister
0 device_del
0 kobject_del
0 kobject_hotplug
132 call_usermodehelper
80 wait_for_completion
68 schedule
0 __put_task_struct
0 audit_free
0 audit_log_end
12 audit_log_end_fast
12 netlink_unicast
76 netlink_attachskb
0 __kfree_skb
0 ip_conntrack_put
0 ip_conntrack_put
12 kfree
0 kernel_map_pages
20 change_page_attr
24 __alloc_pages
284 try_to_free_pages
0 out_of_memory
0 mmput
0 exit_aio
0 __put_ioctx
16 do_munmap
0 fput
0 __fput
0 locks_remove_flock
0 panic
0 sys_sync
0 sync_inodes
308 sync_inodes_sb
0 do_writepages
128 mpage_writepages
204 mpage_writepage
12 mpage_alloc
0 bio_alloc
tackframes for call path too long (3004):
size function
0 ____FAKE.Name.Chip.stat.Regi.LILP.Opti.high.lowe->ProcessIMQEntry
2076 CpqTsProcessIMQEntry
12 cpqfcTSCompleteExchange
12 kfree
0 kernel_map_pages
20 change_page_attr
24 __alloc_pages
284 try_to_free_pages
0 out_of_memory
0 mmput
0 exit_aio
0 __put_ioctx
16 do_munmap
0 fput
0 __fput
0 locks_remove_flock
0 panic
0 sys_sync
0 sync_inodes
308 sync_inodes_sb
0 do_writepages
128 mpage_writepages
4 write_boundary_block
0 ll_rw_block
28 submit_bh
36 submit_bio
56 generic_make_request
0 bdev_get_queue
Not too many above 3k and none above 4k. Actually, intermezzo had
quite a few paths that went above 4k, but that one's gone.
So effectively, it comes down to the recursive paths. Unless someone
comes up with a semantical parser that can figure out the maximum
number of iterations, we have to look at them manually.
Jörn
--
My second remark is that our intellectual powers are rather geared to
master static relations and that our powers to visualize processes
evolving in time are relatively poorly developed.
-- Edsger W. Dijkstra
BZh91AY&SY8yèSî7ß?x@cñ?ïþÀ¿ÿÿð`fà@ ø@Ò??