Skip to content

Commit

Permalink
Merge branch 'for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/tj/wq

Pull qorkqueue updates from Tejun Heo:
 "Tracepoint and comment updates only"

* 'for-5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: Use %s instead of function name
  workqueue: tracing the name of the workqueue instead of it's address
  workqueue: fix annotation for WQ_SYSFS
  • Loading branch information
Linus Torvalds committed Feb 23, 2021
2 parents 4b3bd22 + e9ad2eb commit ac9e806
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/linux/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ enum {
WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */
WQ_HIGHPRI = 1 << 4, /* high priority */
WQ_CPU_INTENSIVE = 1 << 5, /* cpu intensive workqueue */
WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */
WQ_SYSFS = 1 << 6, /* visible in sysfs, see workqueue_sysfs_register() */

/*
* Per-cpu workqueues are generally preferred because they tend to
Expand Down
6 changes: 3 additions & 3 deletions include/trace/events/workqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ TRACE_EVENT(workqueue_queue_work,
TP_STRUCT__entry(
__field( void *, work )
__field( void *, function)
__field( void *, workqueue)
__field( const char *, workqueue)
__field( unsigned int, req_cpu )
__field( unsigned int, cpu )
),

TP_fast_assign(
__entry->work = work;
__entry->function = work->func;
__entry->workqueue = pwq->wq;
__entry->workqueue = pwq->wq->name;
__entry->req_cpu = req_cpu;
__entry->cpu = pwq->pool->cpu;
),

TP_printk("work struct=%p function=%ps workqueue=%p req_cpu=%u cpu=%u",
TP_printk("work struct=%p function=%ps workqueue=%s req_cpu=%u cpu=%u",
__entry->work, __entry->function, __entry->workqueue,
__entry->req_cpu, __entry->cpu)
);
Expand Down
4 changes: 2 additions & 2 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2964,8 +2964,8 @@ void drain_workqueue(struct workqueue_struct *wq)

if (++flush_cnt == 10 ||
(flush_cnt % 100 == 0 && flush_cnt <= 1000))
pr_warn("workqueue %s: drain_workqueue() isn't complete after %u tries\n",
wq->name, flush_cnt);
pr_warn("workqueue %s: %s() isn't complete after %u tries\n",
wq->name, __func__, flush_cnt);

mutex_unlock(&wq->mutex);
goto reflush;
Expand Down

0 comments on commit ac9e806

Please sign in to comment.