Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workqueue: Add helper and corelens module to show unsubmitted pending…
… works. dealyed_work(s) get their pending bit set but are actually submitted to a workqueue, upon expiration of corresponding timer(s). Recently we have found some cases where a delayed work submitted to an already offlined CPU was never getting executed, because underlying timers were not firing in first place. Since the pending bit was set, this gave a notion that work item was lost to workqueue subsystem (which was not the case here.) Add an helper and a corelens module to dump delayed_work(s) whose timer has not yet expired. This is off interest for offline CPUs mainly, because ideally we should not see any delayed_work timer lying on an offlined CPU. So by default the helper and corelens module dump this info for offlined CPUs only like shown in the below snippet: python3 -m drgn_tools.corelens vmcore -d ~/v5.4/ -M unsubmitted_pending_works CPU: 4 state: offline timer: ffff8ce6bd7b3a40 tte(jiffies): 289126 work: ffff8ce6bd7b3a20 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b39e0 tte(jiffies): 289125 work: ffff8ce6bd7b39c0 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b3980 tte(jiffies): 289125 work: ffff8ce6bd7b3960 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b3920 tte(jiffies): 289125 work: ffff8ce6bd7b3900 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b38c0 tte(jiffies): 289124 work: ffff8ce6bd7b38a0 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b3860 tte(jiffies): 289124 work: ffff8ce6bd7b3840 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b3800 tte(jiffies): 289124 work: ffff8ce6bd7b37e0 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b37a0 tte(jiffies): 289124 work: ffff8ce6bd7b3780 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b3740 tte(jiffies): 289124 work: ffff8ce6bd7b3720 func: UNKNOWN: 0xffffffffc0327000 timer: ffff8ce6bd7b36e0 tte(jiffies): 289124 work: ffff8ce6bd7b36c0 func: UNKNOWN: 0xffffffffc0327000 Signed-off-by: Imran Khan <[email protected]>
- Loading branch information