/linux/fs/ |
A D | io-wq.c | 171 return io_get_acct(worker->wqe, worker->flags & IO_WORKER_F_BOUND); in io_wqe_get_acct() 228 worker->flags = 0; in io_worker_exit() 320 wqe = worker->wqe; in create_worker_cb() 675 if (!worker) in io_wq_worker_running() 693 if (!worker) in io_wq_worker_sleeping() 756 wqe = worker->wqe; in create_worker_cont() 779 kfree(worker); in create_worker_cont() 794 kfree(worker); in io_workqueue_create() 805 worker = kzalloc_node(sizeof(*worker), GFP_KERNEL, wqe->node); in create_io_worker() 806 if (!worker) { in create_io_worker() [all …]
|
/linux/kernel/ |
A D | kthread.c | 785 worker = kzalloc(sizeof(*worker), GFP_KERNEL); in __kthread_create_worker() 904 WARN_ON_ONCE(work->worker && work->worker != worker); in kthread_insert_work_sanity_check() 917 work->worker = worker; in kthread_insert_work() 962 struct kthread_worker *worker = work->worker; in kthread_delayed_work_timer_fn() local 974 WARN_ON_ONCE(work->worker != worker); in kthread_delayed_work_timer_fn() 1011 work->worker = worker; in __kthread_queue_delayed_work() 1078 worker = work->worker; in kthread_flush_work() 1084 WARN_ON_ONCE(work->worker != worker); in kthread_flush_work() 1113 struct kthread_worker *worker = work->worker; in kthread_cancel_delayed_work_timer() local 1195 WARN_ON_ONCE(work->worker != worker); in kthread_mod_delayed_work() [all …]
|
A D | workqueue.c | 1047 struct worker *worker; in find_worker_executing_work() local 1378 struct worker *worker; in is_chained_work() local 1463 struct worker *worker; in __queue_work() local 1847 struct worker *worker; in alloc_worker() local 1937 struct worker *worker; in create_worker() local 2021 struct worker *worker; in idle_worker_timeout() local 2627 struct worker *worker; in check_flush_dependency() local 3571 struct worker *worker; in put_unbound_pool() local 4677 struct worker *worker; in print_worker_info() local 4732 struct worker *worker; in show_pwq() local [all …]
|
A D | async.c | 304 struct worker *worker = current_wq_worker(); in current_is_async() local 306 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/include/linux/ |
A D | kthread.h | 106 struct kthread_worker *worker; member 116 #define KTHREAD_WORKER_INIT(worker) { \ argument 133 #define DEFINE_KTHREAD_WORKER(worker) \ argument 134 struct kthread_worker worker = KTHREAD_WORKER_INIT(worker) 148 # define KTHREAD_WORKER_INIT_ONSTACK(worker) \ argument 149 ({ kthread_init_worker(&worker); worker; }) 150 # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) \ argument 151 struct kthread_worker worker = KTHREAD_WORKER_INIT_ONSTACK(worker) 153 # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) DEFINE_KTHREAD_WORKER(worker) argument 159 #define kthread_init_worker(worker) \ argument [all …]
|
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/tools/perf/bench/ |
A D | futex-hash.c | 42 struct worker { struct 72 struct worker *w = (struct worker *) arg; in workerfn() 129 struct worker *worker = NULL; in bench_futex_hash() local 155 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_hash() 156 if (!worker) in bench_futex_hash() 174 worker[i].tid = i; in bench_futex_hash() 175 worker[i].futex = calloc(params.nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash() 187 (void *)(struct worker *) &worker[i]); in bench_futex_hash() 221 worker[i].tid, &worker[i].futex[0], t); in bench_futex_hash() 224 worker[i].tid, &worker[i].futex[0], in bench_futex_hash() [all …]
|
A D | epoll-wait.c | 185 struct worker *w = (struct worker *) arg; in workerfn() 310 struct worker *w = &worker[i]; in do_threads() 368 struct worker *worker = p; in writerfn() local 384 struct worker *w = &worker[i]; in writerfn() 407 struct worker *w1 = (struct worker *) p1; in cmpworker() 408 struct worker *w2 = (struct worker *) p2; in cmpworker() 417 struct worker *worker = NULL; in bench_epoll_wait() local 457 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait() 497 (void *)(struct worker *) worker); in bench_epoll_wait() 528 worker[i].tid, &worker[i].fdmap[0], t); in bench_epoll_wait() [all …]
|
A D | futex-lock-pi.c | 26 struct worker { struct 34 static struct worker *worker; variable 83 struct worker *w = (struct worker *) arg; in workerfn() 129 worker[i].tid = i; in create_threads() 133 if (!worker[i].futex) in create_threads() 136 worker[i].futex = &global_futex; in create_threads() 178 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi() 179 if (!worker) in bench_futex_lock_pi() 227 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi() 230 zfree(&worker[i].futex); in bench_futex_lock_pi() [all …]
|
A D | epoll-ctl.c | 66 struct worker { struct 173 struct worker *w = (struct worker *) arg; in workerfn() 222 static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) in do_threads() argument 233 struct worker *w = &worker[i]; in do_threads() 303 struct worker *worker = NULL; in bench_epoll_ctl() local 338 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl() 339 if (!worker) in bench_epoll_ctl() 365 do_threads(worker, cpu); in bench_epoll_ctl() 392 t[j] = worker[i].ops[j]; in bench_epoll_ctl() 398 worker[i].tid, &worker[i].fdmap[0], in bench_epoll_ctl() [all …]
|
A D | futex-wake.c | 35 static pthread_t *worker; variable 156 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake() 157 if (!worker) in bench_futex_wake() 180 block_threads(worker, thread_attr, cpu); in bench_futex_wake() 209 ret = pthread_join(worker[i], NULL); in bench_futex_wake() 224 free(worker); in bench_futex_wake()
|
A D | futex-requeue.c | 35 static pthread_t *worker; variable 180 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue() 181 if (!worker) in bench_futex_requeue() 210 block_threads(worker, thread_attr, cpu); in bench_futex_requeue() 282 ret = pthread_join(worker[i], NULL); in bench_futex_requeue() 296 free(worker); in bench_futex_requeue()
|
/linux/drivers/net/wireguard/ |
A D | queueing.c | 12 struct multicore_worker __percpu *worker = alloc_percpu(struct multicore_worker); in wg_packet_percpu_multicore_worker_alloc() local 14 if (!worker) in wg_packet_percpu_multicore_worker_alloc() 18 per_cpu_ptr(worker, cpu)->ptr = ptr; in wg_packet_percpu_multicore_worker_alloc() 19 INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function); in wg_packet_percpu_multicore_worker_alloc() 21 return worker; in wg_packet_percpu_multicore_worker_alloc() 33 queue->worker = wg_packet_percpu_multicore_worker_alloc(function, queue); in wg_packet_queue_init() 34 if (!queue->worker) { in wg_packet_queue_init() 43 free_percpu(queue->worker); in wg_packet_queue_free()
|
/linux/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/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/drivers/thermal/intel/ |
A D | intel_powerclamp.c | 74 struct kthread_worker *worker; member 402 kthread_queue_delayed_work(w_data->worker, in clamp_balancing_func() 434 kthread_queue_work(w_data->worker, &w_data->balancing_work); in clamp_idle_injection_func() 477 struct kthread_worker *worker; in start_power_clamp_worker() local 480 if (IS_ERR(worker)) in start_power_clamp_worker() 483 w_data->worker = worker; in start_power_clamp_worker() 488 sched_set_fifo(worker->task); in start_power_clamp_worker() 492 kthread_queue_work(w_data->worker, &w_data->balancing_work); in start_power_clamp_worker() 499 if (!w_data->worker) in stop_power_clamp_worker() 520 kthread_destroy_worker(w_data->worker); in stop_power_clamp_worker() [all …]
|
/linux/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/drivers/gpu/drm/msm/ |
A D | msm_atomic.c | 133 timer->worker = kthread_create_worker(0, "atomic-worker-%d", crtc_idx); in msm_atomic_init_pending_timer() 134 if (IS_ERR(timer->worker)) { in msm_atomic_init_pending_timer() 135 int ret = PTR_ERR(timer->worker); in msm_atomic_init_pending_timer() 136 timer->worker = NULL; in msm_atomic_init_pending_timer() 139 sched_set_fifo(timer->worker->task); in msm_atomic_init_pending_timer() 141 msm_hrtimer_work_init(&timer->work, timer->worker, in msm_atomic_init_pending_timer() 150 if (timer->worker) in msm_atomic_destroy_pending_timer() 151 kthread_destroy_worker(timer->worker); in msm_atomic_destroy_pending_timer()
|
/linux/drivers/block/ |
A D | loop.c | 839 worker = cur_worker; in loop_queue_work() 847 if (worker) in loop_queue_work() 855 if (!worker) { in loop_queue_work() 864 css_get(worker->blkcg_css); in loop_queue_work() 868 worker->lo = lo; in loop_queue_work() 872 if (worker) { in loop_queue_work() 880 work = &worker->work; in loop_queue_work() 1131 kfree(worker); in __loop_clr_fd() 1908 if (worker && !work_pending(&worker->work)) { in loop_process_work() 1921 loop_process_work(worker, &worker->cmd_list, worker->lo); in loop_workfn() [all …]
|
/linux/drivers/hid/ |
A D | hid-bigbenff.c | 184 struct work_struct worker; member 191 struct bigben_device, worker); in bigben_worker() 248 schedule_work(&bigben->worker); in hid_bigben_play_effect() 280 schedule_work(&bigben->worker); in bigben_set_led() 312 cancel_work_sync(&bigben->worker); in bigben_remove() 353 INIT_WORK(&bigben->worker, bigben_worker); in bigben_probe() 394 schedule_work(&bigben->worker); in bigben_probe()
|
/linux/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/drivers/crypto/caam/ |
A D | caamrng.c | 41 struct work_struct worker; member 141 worker); in caam_rng_worker() 159 schedule_work(&ctx->worker); in caam_read() 168 flush_work(&ctx->worker); in caam_cleanup() 192 INIT_WORK(&ctx->worker, caam_rng_worker); in caam_init()
|
/linux/drivers/platform/olpc/ |
A D | olpc-ec.c | 36 struct work_struct worker; member 79 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker() 105 schedule_work(&ec->worker); in olpc_ec_worker() 123 schedule_work(&ec->worker); in queue_ec_descriptor() 419 INIT_WORK(&ec->worker, olpc_ec_worker); in olpc_ec_probe()
|