Home
last modified time | relevance | path

Searched refs:worker (Results 1 – 25 of 157) sorted by relevance

1234567

/linux-6.15/io_uring/
H A Dio-wq.c351 wq = worker->wq; in create_worker_cb()
716 if (!worker) in io_wq_worker_running()
734 if (!worker) in io_wq_worker_sleeping()
808 wq = worker->wq; in create_worker_cont()
832 kfree(worker); in create_worker_cont()
848 kfree(worker); in io_workqueue_create()
858 worker = kzalloc(sizeof(*worker), GFP_KERNEL); in create_io_worker()
859 if (!worker) { in create_io_worker()
870 worker->wq = wq; in create_io_worker()
879 kfree(worker); in create_io_worker()
[all …]
/linux-6.15/kernel/
H A Dkthread.c1154 WARN_ON_ONCE(work->worker && work->worker != worker); in kthread_insert_work_sanity_check()
1167 work->worker = worker; in kthread_insert_work()
1212 struct kthread_worker *worker = work->worker; in kthread_delayed_work_timer_fn() local
1224 WARN_ON_ONCE(work->worker != worker); in kthread_delayed_work_timer_fn()
1260 work->worker = worker; in __kthread_queue_delayed_work()
1327 worker = work->worker; in kthread_flush_work()
1333 WARN_ON_ONCE(work->worker != worker); in kthread_flush_work()
1362 struct kthread_worker *worker = work->worker; in kthread_cancel_delayed_work_timer() local
1444 WARN_ON_ONCE(work->worker != worker); in kthread_mod_delayed_work()
1476 struct kthread_worker *worker = work->worker; in __kthread_cancel_work_sync() local
[all …]
H A Dworkqueue.c1112 struct worker *worker; in find_worker_executing_work() local
2197 struct worker *worker; in is_chained_work() local
2285 struct worker *worker; in __queue_work() local
2645 struct worker *worker; in alloc_worker() local
2779 struct worker *worker; in create_worker() local
2848 struct worker *worker; in detach_dying_workers() local
2921 struct worker *worker; in idle_worker_timeout() local
2964 struct worker *worker; in idle_cull_fn() local
3706 struct worker *worker; in check_flush_dependency() local
4929 struct worker *worker; in put_unbound_pool() local
[all …]
/linux-6.15/tools/perf/bench/
H A Dfutex-hash.c43 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 …]
H A Depoll-wait.c186 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()
436 struct worker *worker = NULL; in bench_epoll_wait() local
476 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_wait()
516 (void *)(struct worker *) worker); in bench_epoll_wait()
547 worker[i].tid, &worker[i].fdmap[0], t); in bench_epoll_wait()
[all …]
H A Dfutex-lock-pi.c27 struct worker { struct
35 static struct worker *worker; argument
84 struct worker *w = (struct worker *) arg; in workerfn()
138 worker[i].tid = i; in create_threads()
142 if (!worker[i].futex) in create_threads()
192 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi()
193 if (!worker) in bench_futex_lock_pi()
210 create_threads(worker, cpu); 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 …]
H A Depoll-ctl.c67 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()
412 worker[i].tid, &worker[i].fdmap[0], in bench_epoll_ctl()
416 worker[i].tid, &worker[i].fdmap[0], in bench_epoll_ctl()
426 free(worker[i].fdmap); in bench_epoll_ctl()
[all …]
H A Dsched-messaging.c164 ret = pthread_create(&worker->thread, &attr, func, ctx); in create_thread_worker()
175 worker->pid = fork(); in create_process_worker()
177 if (worker->pid == -1) { in create_process_worker()
179 } else if (worker->pid == 0) { in create_process_worker()
185 static void create_worker(union messaging_worker *worker, in create_worker() argument
189 return create_process_worker(worker, ctx, func); in create_worker()
191 return create_thread_worker(worker, ctx, func); in create_worker()
194 static void reap_worker(union messaging_worker *worker) in reap_worker() argument
205 pthread_join(worker->thread, &thread_status); in reap_worker()
210 static unsigned int group(union messaging_worker *worker, in group() argument
[all …]
H A Dfutex-wake.c36 static pthread_t *worker; variable
169 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_wake()
170 if (!worker) in bench_futex_wake()
192 block_threads(worker, cpu); in bench_futex_wake()
221 ret = pthread_join(worker[i], NULL); in bench_futex_wake()
235 free(worker); in bench_futex_wake()
H A Dfutex-requeue.c36 static pthread_t *worker; variable
194 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_requeue()
195 if (!worker) in bench_futex_requeue()
223 block_threads(worker, cpu); in bench_futex_requeue()
295 ret = pthread_join(worker[i], NULL); in bench_futex_requeue()
308 free(worker); in bench_futex_requeue()
/linux-6.15/drivers/vhost/
H A Dvhost.c255 worker = rcu_dereference(vq->worker); in vhost_vq_work_queue()
256 if (worker) { in vhost_vq_work_queue()
276 if (!worker->attachment_cnt || worker->killed) in __vhost_worker_flush()
316 worker = rcu_dereference(vq->worker); in vhost_vq_has_work()
317 if (worker && !llist_empty(&worker->work_list)) in vhost_vq_has_work()
660 worker = kzalloc(sizeof(*worker), GFP_KERNEL_ACCOUNT); in vhost_worker_create()
709 rcu_assign_pointer(vq->worker, worker); in __vhost_vq_attach_worker()
774 if (!worker || worker->id != info->worker_id) in vhost_vq_attach_worker()
803 if (!worker || worker->id != info->worker_id) in vhost_free_worker()
807 if (worker->attachment_cnt || worker->killed) { in vhost_free_worker()
[all …]
/linux-6.15/drivers/net/wireguard/
H A Dqueueing.c13 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()
35 queue->worker = wg_packet_percpu_multicore_worker_alloc(function, queue); in wg_packet_queue_init()
36 if (!queue->worker) { in wg_packet_queue_init()
45 free_percpu(queue->worker); in wg_packet_queue_free()
/linux-6.15/include/linux/
H A Dkthread.h136 struct kthread_worker *worker; member
164 extern void __kthread_init_worker(struct kthread_worker *worker,
167 #define kthread_init_worker(worker) \ argument
170 __kthread_init_worker((worker), "("#worker")->lock", &__key); \
243 bool kthread_queue_work(struct kthread_worker *worker,
246 bool kthread_queue_delayed_work(struct kthread_worker *worker,
250 bool kthread_mod_delayed_work(struct kthread_worker *worker,
255 void kthread_flush_worker(struct kthread_worker *worker);
260 void kthread_destroy_worker(struct kthread_worker *worker);
H A Ddevm-helpers.h48 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.15/drivers/gpu/drm/
H A Ddrm_vblank_work.c60 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works()
150 ret = kthread_queue_work(vblank->worker, &work->base); in drm_vblank_work_schedule()
253 kthread_flush_worker(vblank->worker); in drm_vblank_work_flush_all()
276 struct kthread_worker *worker; in drm_vblank_worker_init() local
280 worker = kthread_run_worker(0, "card%d-crtc%d", in drm_vblank_worker_init()
283 if (IS_ERR(worker)) in drm_vblank_worker_init()
284 return PTR_ERR(worker); in drm_vblank_worker_init()
286 vblank->worker = worker; in drm_vblank_worker_init()
288 sched_set_fifo(worker->task); in drm_vblank_worker_init()
/linux-6.15/samples/seccomp/
H A Duser-trap.c208 pid_t worker = 0 , tracer = 0; in main() local
215 worker = fork(); in main()
216 if (worker < 0) { in main()
221 if (worker == 0) { in main()
347 if (waitpid(worker, &status, 0) != worker) { in main()
372 if (worker > 0) in main()
373 kill(worker, SIGKILL); in main()
/linux-6.15/drivers/gpu/drm/msm/
H A Dmsm_atomic.c118 timer->worker = kthread_run_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()
H A Dmsm_kms.c232 if (priv->event_thread[i].worker) in msm_drm_kms_uninit()
233 kthread_destroy_worker(priv->event_thread[i].worker); in msm_drm_kms_uninit()
288 ev_thread->worker = kthread_run_worker(0, "crtc_event:%d", crtc->base.id); in msm_drm_kms_init()
289 if (IS_ERR(ev_thread->worker)) { in msm_drm_kms_init()
290 ret = PTR_ERR(ev_thread->worker); in msm_drm_kms_init()
292 ev_thread->worker = NULL; in msm_drm_kms_init()
296 sched_set_fifo(ev_thread->worker->task); in msm_drm_kms_init()
H A Dmsm_io_utils.c120 kthread_queue_work(work->worker, &work->work); in msm_hrtimer_worktimer()
133 struct kthread_worker *worker, in msm_hrtimer_work_init() argument
139 work->worker = worker; in msm_hrtimer_work_init()
/linux-6.15/Documentation/core-api/
H A Dworkqueue.rst20 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
84 the worker threads become idle. These worker threads are managed in
85 worker-pools.
98 Each per-CPU BH worker pool contains only one pseudo worker which represents
188 worker-pools which host workers which are not bound to any
215 worker-pool of the target cpu. Highpri worker-pools are
216 served by worker threads with elevated nice level.
[all …]
/linux-6.15/drivers/gpu/drm/xe/
H A Dxe_sriov_vf.c132 INIT_WORK(&xe->sriov.vf.migration.worker, migration_worker_func); in xe_sriov_vf_init_early()
170 work_pending(&xe->sriov.vf.migration.worker); in vf_post_migration_imminent()
222 sriov.vf.migration.worker); in migration_worker_func()
260 started = queue_work(xe->sriov.wq, &xe->sriov.vf.migration.worker); in xe_sriov_vf_start_migration_recovery()
/linux-6.15/drivers/block/
H A Dloop.c801 worker = cur_worker; in loop_queue_work()
809 if (worker) in loop_queue_work()
817 if (!worker) { in loop_queue_work()
826 css_get(worker->blkcg_css); in loop_queue_work()
830 worker->lo = lo; in loop_queue_work()
834 if (worker) { in loop_queue_work()
842 work = &worker->work; in loop_queue_work()
871 css_put(worker->blkcg_css); in loop_free_idle_workers()
872 kfree(worker); in loop_free_idle_workers()
1932 if (worker && !work_pending(&worker->work)) { in loop_process_work()
[all …]
/linux-6.15/drivers/md/
H A Ddm-delay.c36 struct task_struct *worker; member
67 return !!dc->worker; in delay_is_fast()
169 if (dc->worker) in delay_dtr()
170 kthread_stop(dc->worker); in delay_dtr()
273 dc->worker = kthread_run(&flush_worker_fn, dc, "dm-delay-flush-worker"); in delay_ctr()
274 if (IS_ERR(dc->worker)) { in delay_ctr()
275 ret = PTR_ERR(dc->worker); in delay_ctr()
276 dc->worker = NULL; in delay_ctr()
324 wake_up_process(dc->worker); in delay_bio()
/linux-6.15/fs/erofs/
H A Dzdata.c294 struct kthread_worker *worker; in erofs_destroy_percpu_workers() local
301 if (worker) in erofs_destroy_percpu_workers()
312 if (IS_ERR(worker)) in erofs_init_percpu_worker()
313 return worker; in erofs_init_percpu_worker()
316 return worker; in erofs_init_percpu_worker()
331 if (!IS_ERR(worker)) in erofs_init_percpu_workers()
350 if (IS_ERR(worker)) in erofs_cpu_online()
351 return PTR_ERR(worker); in erofs_cpu_online()
375 if (worker) in erofs_cpu_offline()
1422 worker = rcu_dereference( in z_erofs_decompress_kickoff()
[all …]
/linux-6.15/drivers/i2c/
H A Di2c-slave-testunit.c50 struct delayed_work worker; member
127 queue_delayed_work(system_long_wq, &tu->worker, in i2c_slave_testunit_slave_cb()
170 struct testunit_data *tu = container_of(work, struct testunit_data, worker.work); in i2c_slave_testunit_work()
247 INIT_DELAYED_WORK(&tu->worker, i2c_slave_testunit_work); in i2c_slave_testunit_probe()
268 cancel_delayed_work_sync(&tu->worker); in i2c_slave_testunit_remove()

1234567