Skip to content

Commit

Permalink
workqueue: handle changes in 6.9
Browse files Browse the repository at this point in the history
The max_active field got moved into the workqueue_struct.

Orabug: 37296325
Signed-off-by: Stephen Brennan <[email protected]>
  • Loading branch information
brenns10 committed Nov 20, 2024
1 parent 5abf2d9 commit 1d809d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drgn_tools/workqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,18 @@ def show_pwq(pwq: Object) -> None:

print(f"pwq: ({pwq.type_.type_name()})0x{pwq.value_():x}")
print("pool id:", pwq.pool.id.value_())
# v6.9: a045a272d887 ("workqueue: Move pwq->max_active to wq->max_active")
# Note that this commit appears to have been backported into stable trees,
# and then also reverted...
if hasattr(pwq, "max_active"):
max_active = pwq.max_active
else:
max_active = pwq.wq.max_active
print(
"active/max_active ",
pwq.nr_active.value_(),
"/",
pwq.max_active.value_(),
max_active.value_(),
)
print(f"refcnt: {pwq.refcnt.value_()} Mayday: {mayday}")

Expand Down

0 comments on commit 1d809d3

Please sign in to comment.