You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
task.c: avoid unnecessary cpu cycles in stkptr_to_task()
While stkptr_to_task does the job of trying to match a stack pointer
to a task, it runs through each task's stack to find whether the given
SP falls into its range. This can be a very expensive operation, if
the vmcore is from a system running too many tasks. It can get even
worse when the total number of CPUs on the system is in the order of
thousands. Given the expensive nature of the operation, it must be
optimized as much as possible. Possible options to optimize:
1) Get min & max of the stack range in first pass and use these
values against the given SP to decide whether or not to proceed
with stack lookup.
2) Use multithreading to parallely update irq_tasks.
3) Skip stkptr_to_task() when SP is 0
Though option 3 is a low hanging fruit, it significantly improved the
time taken between starting crash utility & reaching crash prompt.
Implement option 3 to optimize while listing the other two options
as TODO items for follow-up.
Signed-off-by: Hari Bathini <[email protected]>
0 commit comments