diff options
| author | 2019-02-22 13:48:13 +0100 | |
|---|---|---|
| committer | 2019-02-22 13:48:13 +0100 | |
| commit | b7b14ec1ebef35d22f3f4087816468f22c987f75 (patch) | |
| tree | 3f99f4d7b770d7bba3ee84663b32f98dfbe7582d /kernel/workqueue.c | |
| parent | mac80211: update HE IEs to D3.3 (diff) | |
| parent | rocker: Add missing break for PRE_BRIDGE_FLAGS (diff) | |
| download | wireguard-linux-b7b14ec1ebef35d22f3f4087816468f22c987f75.tar.xz wireguard-linux-b7b14ec1ebef35d22f3f4087816468f22c987f75.zip | |
Merge remote-tracking branch 'net-next/master' into mac80211-next
Merge net-next to resolve a conflict and to get the mac80211
rhashtable fixes so further patches can be applied on top.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 392be4b252f6..fc5d23d752a5 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -910,6 +910,26 @@ struct task_struct *wq_worker_sleeping(struct task_struct *task) } /** + * wq_worker_last_func - retrieve worker's last work function + * + * Determine the last function a worker executed. This is called from + * the scheduler to get a worker's last known identity. + * + * CONTEXT: + * spin_lock_irq(rq->lock) + * + * Return: + * The last work function %current executed as a worker, NULL if it + * hasn't executed any work yet. + */ +work_func_t wq_worker_last_func(struct task_struct *task) +{ + struct worker *worker = kthread_data(task); + + return worker->last_func; +} + +/** * worker_set_flags - set worker flags and adjust nr_running accordingly * @worker: self * @flags: flags to set @@ -2184,6 +2204,9 @@ __acquires(&pool->lock) if (unlikely(cpu_intensive)) worker_clr_flags(worker, WORKER_CPU_INTENSIVE); + /* tag the worker for identification in schedule() */ + worker->last_func = worker->current_func; + /* we're done with it, release */ hash_del(&worker->hentry); worker->current_work = NULL; |
