/linux-6.3-rc2/io_uring/ |
A D | io-wq.c | 175 return io_get_acct(worker->wqe, worker->flags & IO_WORKER_F_BOUND); in io_wqe_get_acct() 232 worker->flags = 0; in io_worker_exit() 679 if (!worker) in io_wq_worker_running() 697 if (!worker) in io_wq_worker_sleeping() 781 kfree(worker); in create_worker_cont() 796 kfree(worker); in io_workqueue_create() 807 worker = kzalloc_node(sizeof(*worker), GFP_KERNEL, wqe->node); in create_io_worker() 808 if (!worker) { in create_io_worker() 830 kfree(worker); in create_io_worker() 1003 if (__io_wq_worker_cancel(worker, match, worker->cur_work) || in io_wq_worker_cancel() [all …]
|
/linux-6.3-rc2/kernel/ |
A D | kthread.c | 846 worker = kzalloc(sizeof(*worker), GFP_KERNEL); in __kthread_create_worker() 965 WARN_ON_ONCE(work->worker && work->worker != worker); in kthread_insert_work_sanity_check() 978 work->worker = worker; in kthread_insert_work() 1023 struct kthread_worker *worker = work->worker; in kthread_delayed_work_timer_fn() local 1035 WARN_ON_ONCE(work->worker != worker); in kthread_delayed_work_timer_fn() 1071 work->worker = worker; in __kthread_queue_delayed_work() 1138 worker = work->worker; in kthread_flush_work() 1144 WARN_ON_ONCE(work->worker != worker); in kthread_flush_work() 1173 struct kthread_worker *worker = work->worker; in kthread_cancel_delayed_work_timer() local 1255 WARN_ON_ONCE(work->worker != worker); in kthread_mod_delayed_work() [all …]
|
A D | workqueue.c | 1054 struct worker *worker; in find_worker_executing_work() local 1378 struct worker *worker; in is_chained_work() local 1467 struct worker *worker; in __queue_work() local 1845 struct worker *worker; in alloc_worker() local 1935 struct worker *worker; in create_worker() local 2068 struct worker *worker; in idle_worker_timeout() local 2112 struct worker *worker; in idle_cull_fn() local 2719 struct worker *worker; in check_flush_dependency() local 3661 struct worker *worker; in put_unbound_pool() local 4795 struct worker *worker; in print_worker_info() local [all …]
|
A D | async.c | 301 struct worker *worker = current_wq_worker(); in current_is_async() local 303 return worker && worker->current_func == async_run_entry_fn; in current_is_async()
|
A D | workqueue_internal.h | 24 struct worker { struct 66 static inline struct worker *current_wq_worker(void) in current_wq_worker()
|
/linux-6.3-rc2/tools/perf/bench/ |
A D | futex-hash.c | 43 struct worker { struct 73 struct worker *w = (struct worker *) arg; in workerfn() 130 struct worker *worker = NULL; in bench_futex_hash() local 158 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 159 if (!worker) in bench_futex_hash() 183 worker[i].tid = i; in bench_futex_hash() 184 worker[i].futex = calloc(params.nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash() 197 (void *)(struct worker *) &worker[i]); in bench_futex_hash() 234 worker[i].tid, &worker[i].futex[0], t); in bench_futex_hash() 237 worker[i].tid, &worker[i].futex[0], in bench_futex_hash() [all …]
|
A D | epoll-wait.c | 186 struct worker *w = (struct worker *) arg; in workerfn() 318 struct worker *w = &worker[i]; in do_threads() 382 struct worker *worker = p; in writerfn() local 398 struct worker *w = &worker[i]; in writerfn() 421 struct worker *w1 = (struct worker *) p1; in cmpworker() 422 struct worker *w2 = (struct worker *) p2; in cmpworker() 431 struct worker *worker = NULL; in bench_epoll_wait() local 471 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait() 511 (void *)(struct worker *) worker); in bench_epoll_wait() 542 worker[i].tid, &worker[i].fdmap[0], t); in bench_epoll_wait() [all …]
|
A D | futex-lock-pi.c | 27 struct worker { struct 35 static struct worker *worker; variable 84 struct worker *w = (struct worker *) arg; in workerfn() 136 worker[i].tid = i; in create_threads() 140 if (!worker[i].futex) in create_threads() 143 worker[i].futex = &global_futex; in create_threads() 190 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() 191 if (!worker) in bench_futex_lock_pi() 239 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi() 242 zfree(&worker[i].futex); in bench_futex_lock_pi() [all …]
|
A D | epoll-ctl.c | 67 struct worker { struct 174 struct worker *w = (struct worker *) arg; in workerfn() 223 static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) in do_threads() argument 241 struct worker *w = &worker[i]; in do_threads() 317 struct worker *worker = NULL; in bench_epoll_ctl() local 352 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() 353 if (!worker) in bench_epoll_ctl() 379 do_threads(worker, cpu); in bench_epoll_ctl() 406 t[j] = worker[i].ops[j]; in bench_epoll_ctl() 412 worker[i].tid, &worker[i].fdmap[0], in bench_epoll_ctl() [all …]
|
A D | futex-wake.c | 36 static pthread_t *worker; variable 167 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 168 if (!worker) in bench_futex_wake() 191 block_threads(worker, thread_attr, cpu); in bench_futex_wake() 220 ret = pthread_join(worker[i], NULL); in bench_futex_wake() 235 free(worker); in bench_futex_wake()
|
A D | futex-requeue.c | 36 static pthread_t *worker; variable 192 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue() 193 if (!worker) in bench_futex_requeue() 222 block_threads(worker, thread_attr, cpu); in bench_futex_requeue() 294 ret = pthread_join(worker[i], NULL); in bench_futex_requeue() 308 free(worker); in bench_futex_requeue()
|
/linux-6.3-rc2/include/linux/ |
A D | kthread.h | 134 struct kthread_worker *worker; member 162 extern void __kthread_init_worker(struct kthread_worker *worker, 165 #define kthread_init_worker(worker) \ argument 168 __kthread_init_worker((worker), "("#worker")->lock", &__key); \ 196 bool kthread_queue_work(struct kthread_worker *worker, 199 bool kthread_queue_delayed_work(struct kthread_worker *worker, 203 bool kthread_mod_delayed_work(struct kthread_worker *worker, 208 void kthread_flush_worker(struct kthread_worker *worker); 213 void kthread_destroy_worker(struct kthread_worker *worker);
|
A D | devm-helpers.h | 48 work_func_t worker) in devm_delayed_work_autocancel() argument 50 INIT_DELAYED_WORK(w, worker); in devm_delayed_work_autocancel() 73 work_func_t worker) in devm_work_autocancel() argument 75 INIT_WORK(w, worker); in devm_work_autocancel()
|
/linux-6.3-rc2/drivers/net/wireguard/ |
A D | queueing.c | 13 struct multicore_worker __percpu *worker = alloc_percpu(struct multicore_worker); in wg_packet_percpu_multicore_worker_alloc() local 15 if (!worker) in wg_packet_percpu_multicore_worker_alloc() 19 per_cpu_ptr(worker, cpu)->ptr = ptr; in wg_packet_percpu_multicore_worker_alloc() 20 INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function); in wg_packet_percpu_multicore_worker_alloc() 22 return worker; in wg_packet_percpu_multicore_worker_alloc() 34 queue->worker = wg_packet_percpu_multicore_worker_alloc(function, queue); in wg_packet_queue_init() 35 if (!queue->worker) { in wg_packet_queue_init() 44 free_percpu(queue->worker); in wg_packet_queue_free()
|
/linux-6.3-rc2/drivers/gpu/drm/ |
A D | drm_vblank_work.c | 60 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works() 147 ret = kthread_queue_work(vblank->worker, &work->base); in drm_vblank_work_schedule() 251 struct kthread_worker *worker; in drm_vblank_worker_init() local 255 worker = kthread_create_worker(0, "card%d-crtc%d", in drm_vblank_worker_init() 258 if (IS_ERR(worker)) in drm_vblank_worker_init() 259 return PTR_ERR(worker); in drm_vblank_worker_init() 261 vblank->worker = worker; in drm_vblank_worker_init() 263 sched_set_fifo(worker->task); in drm_vblank_worker_init()
|
A D | drm_flip_work.c | 110 queue_work(wq, &work->worker); in drm_flip_work_commit() 116 struct drm_flip_work *work = container_of(w, struct drm_flip_work, worker); in flip_worker() 156 INIT_WORK(&work->worker, flip_worker); in drm_flip_work_init()
|
/linux-6.3-rc2/Documentation/core-api/ |
A D | workqueue.rst | 20 queue is called workqueue and the thread is called worker. 22 While there are work items on the workqueue the worker executes the 32 worker thread per CPU and a single threaded (ST) wq had one worker 60 * Use per-CPU unified worker pools shared by all wq to provide 82 worker threads become idle. These worker threads are managed in so 83 called worker-pools. 115 Each worker-pool bound to an actual CPU implements concurrency 169 worker-pools which host workers which are not bound to any 196 worker-pool of the target cpu. Highpri worker-pools are 197 served by worker threads with elevated nice level. [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/msm/ |
A D | msm_atomic.c | 118 timer->worker = kthread_create_worker(0, "atomic-worker-%d", crtc_idx); in msm_atomic_init_pending_timer() 119 if (IS_ERR(timer->worker)) { in msm_atomic_init_pending_timer() 120 int ret = PTR_ERR(timer->worker); in msm_atomic_init_pending_timer() 121 timer->worker = NULL; in msm_atomic_init_pending_timer() 124 sched_set_fifo(timer->worker->task); in msm_atomic_init_pending_timer() 126 msm_hrtimer_work_init(&timer->work, timer->worker, in msm_atomic_init_pending_timer() 135 if (timer->worker) in msm_atomic_destroy_pending_timer() 136 kthread_destroy_worker(timer->worker); in msm_atomic_destroy_pending_timer()
|
A D | msm_io_utils.c | 106 kthread_queue_work(work->worker, &work->work); in msm_hrtimer_worktimer() 119 struct kthread_worker *worker, in msm_hrtimer_work_init() argument 126 work->worker = worker; in msm_hrtimer_work_init()
|
/linux-6.3-rc2/samples/seccomp/ |
A D | user-trap.c | 204 pid_t worker = 0 , tracer = 0; in main() local 211 worker = fork(); in main() 212 if (worker < 0) { in main() 217 if (worker == 0) { in main() 343 if (waitpid(worker, &status, 0) != worker) { in main() 368 if (worker > 0) in main() 369 kill(worker, SIGKILL); in main()
|
/linux-6.3-rc2/drivers/i2c/ |
A D | i2c-slave-testunit.c | 43 struct delayed_work worker; member 48 struct testunit_data *tu = container_of(work, struct testunit_data, worker.work); in i2c_slave_testunit_work() 118 queue_delayed_work(system_long_wq, &tu->worker, in i2c_slave_testunit_slave_cb() 151 INIT_DELAYED_WORK(&tu->worker, i2c_slave_testunit_work); in i2c_slave_testunit_probe() 160 cancel_delayed_work_sync(&tu->worker); in i2c_slave_testunit_remove()
|
/linux-6.3-rc2/drivers/block/ |
A D | loop.c | 849 worker = cur_worker; in loop_queue_work() 857 if (worker) in loop_queue_work() 865 if (!worker) { in loop_queue_work() 874 css_get(worker->blkcg_css); in loop_queue_work() 878 worker->lo = lo; in loop_queue_work() 882 if (worker) { in loop_queue_work() 890 work = &worker->work; in loop_queue_work() 919 css_put(worker->blkcg_css); in loop_free_idle_workers() 920 kfree(worker); in loop_free_idle_workers() 1925 if (worker && !work_pending(&worker->work)) { in loop_process_work() [all …]
|
/linux-6.3-rc2/fs/erofs/ |
A D | zdata.c | 350 struct kthread_worker *worker; in erofs_destroy_percpu_workers() local 357 if (worker) in erofs_destroy_percpu_workers() 368 if (IS_ERR(worker)) in erofs_init_percpu_worker() 369 return worker; in erofs_init_percpu_worker() 374 return worker; in erofs_init_percpu_worker() 389 if (!IS_ERR(worker)) in erofs_init_percpu_workers() 408 if (IS_ERR(worker)) in erofs_cpu_online() 409 return PTR_ERR(worker); in erofs_cpu_online() 433 if (worker) in erofs_cpu_offline() 1465 worker = rcu_dereference( in z_erofs_decompress_kickoff() [all …]
|
/linux-6.3-rc2/drivers/crypto/caam/ |
A D | caamrng.c | 43 struct work_struct worker; member 143 worker); in caam_rng_worker() 161 schedule_work(&ctx->worker); in caam_read() 170 flush_work(&ctx->worker); in caam_cleanup() 195 INIT_WORK(&ctx->worker, caam_rng_worker); in caam_init()
|
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/ |
A D | selftest_slpc.c | 20 struct kthread_worker *worker; member 459 threads[i].worker = kthread_create_worker(0, "igt/slpc_parallel:%d", gt->info.id); in live_slpc_tile_interaction() 461 if (IS_ERR(threads[i].worker)) { in live_slpc_tile_interaction() 462 ret = PTR_ERR(threads[i].worker); in live_slpc_tile_interaction() 468 kthread_queue_work(threads[i].worker, &threads[i].work); in live_slpc_tile_interaction() 474 if (IS_ERR_OR_NULL(threads[i].worker)) in live_slpc_tile_interaction() 483 kthread_destroy_worker(threads[i].worker); in live_slpc_tile_interaction()
|