Home
last modified time | relevance | path

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

1234

/Linux-v5.4/kernel/
Dkthread.c606 void __kthread_init_worker(struct kthread_worker *worker, in __kthread_init_worker() argument
610 memset(worker, 0, sizeof(struct kthread_worker)); in __kthread_init_worker()
611 raw_spin_lock_init(&worker->lock); in __kthread_init_worker()
612 lockdep_set_class_and_name(&worker->lock, key, name); in __kthread_init_worker()
613 INIT_LIST_HEAD(&worker->work_list); in __kthread_init_worker()
614 INIT_LIST_HEAD(&worker->delayed_work_list); in __kthread_init_worker()
635 struct kthread_worker *worker = worker_ptr; in kthread_worker_fn() local
642 WARN_ON(worker->task && worker->task != current); in kthread_worker_fn()
643 worker->task = current; in kthread_worker_fn()
645 if (worker->flags & KTW_FREEZABLE) in kthread_worker_fn()
[all …]
Dworkqueue.c169 struct worker *manager; /* L: purely informational */
251 struct worker *rescuer; /* I: rescue worker */
410 #define for_each_pool_worker(worker, pool) \ argument
411 list_for_each_entry((worker), &(pool)->workers, node) \
819 static struct worker *first_idle_worker(struct worker_pool *pool) in first_idle_worker()
824 return list_first_entry(&pool->idle_list, struct worker, entry); in first_idle_worker()
838 struct worker *worker = first_idle_worker(pool); in wake_up_worker() local
840 if (likely(worker)) in wake_up_worker()
841 wake_up_process(worker->task); in wake_up_worker()
852 struct worker *worker = kthread_data(task); in wq_worker_running() local
[all …]
Dasync.c330 struct worker *worker = current_wq_worker(); in current_is_async() local
332 return worker && worker->current_func == async_run_entry_fn; in current_is_async()
Dworkqueue_internal.h24 struct worker { struct
65 static inline struct worker *current_wq_worker(void) in current_wq_worker()
/Linux-v5.4/include/linux/
Dkthread.h98 struct kthread_worker *worker; member
108 #define KTHREAD_WORKER_INIT(worker) { \ argument
109 .lock = __RAW_SPIN_LOCK_UNLOCKED((worker).lock), \
110 .work_list = LIST_HEAD_INIT((worker).work_list), \
111 .delayed_work_list = LIST_HEAD_INIT((worker).delayed_work_list),\
125 #define DEFINE_KTHREAD_WORKER(worker) \ argument
126 struct kthread_worker worker = KTHREAD_WORKER_INIT(worker)
140 # define KTHREAD_WORKER_INIT_ONSTACK(worker) \ argument
141 ({ kthread_init_worker(&worker); worker; })
142 # define DEFINE_KTHREAD_WORKER_ONSTACK(worker) \ argument
[all …]
/Linux-v5.4/tools/perf/bench/
Dfutex-hash.c46 struct worker { struct
70 struct worker *w = (struct worker *) arg; in workerfn() argument
127 struct worker *worker = NULL; in bench_futex_hash() local
147 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_hash()
148 if (!worker) in bench_futex_hash()
166 worker[i].tid = i; in bench_futex_hash()
167 worker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex)); in bench_futex_hash()
168 if (!worker[i].futex) in bench_futex_hash()
178 ret = pthread_create(&worker[i].thread, &thread_attr, workerfn, in bench_futex_hash()
179 (void *)(struct worker *) &worker[i]); in bench_futex_hash()
[all …]
Dfutex-lock-pi.c26 struct worker { struct
34 static struct worker *worker; variable
82 struct worker *w = (struct worker *) arg; in workerfn()
119 static void create_threads(struct worker *w, pthread_attr_t thread_attr, in create_threads()
128 worker[i].tid = i; in create_threads()
131 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads()
132 if (!worker[i].futex) in create_threads()
135 worker[i].futex = &global_futex; in create_threads()
143 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) in create_threads()
171 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
[all …]
Depoll-wait.c119 struct worker { struct
187 struct worker *w = (struct worker *) arg; in workerfn()
241 static void nest_epollfd(struct worker *w) in nest_epollfd()
293 static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) in do_threads() argument
312 struct worker *w = &worker[i]; in do_threads()
357 (void *)(struct worker *) w); in do_threads()
370 struct worker *worker = p; in writerfn() local
382 shuffle((void *)worker, nthreads, sizeof(*worker)); in writerfn()
386 struct worker *w = &worker[i]; in writerfn()
409 struct worker *w1 = (struct worker *) p1; in cmpworker()
[all …]
Depoll-ctl.c68 struct worker { struct
133 static inline void do_epoll_op(struct worker *w, int op, int fd) in do_epoll_op()
161 static inline void do_random_epoll_op(struct worker *w) in do_random_epoll_op()
175 struct worker *w = (struct worker *) arg; in workerfn()
205 static void init_fdmaps(struct worker *w, int pct) in init_fdmaps()
224 static int do_threads(struct worker *worker, struct perf_cpu_map *cpu) in do_threads() argument
235 struct worker *w = &worker[i]; in do_threads()
268 (void *)(struct worker *) w); in do_threads()
305 struct worker *worker = NULL; in bench_epoll_ctl() local
339 worker = calloc(nthreads, sizeof(*worker)); in bench_epoll_ctl()
[all …]
Dfutex-wake.c41 pthread_t *worker; variable
146 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_wake()
147 if (!worker) in bench_futex_wake()
169 block_threads(worker, thread_attr, cpu); in bench_futex_wake()
196 ret = pthread_join(worker[i], NULL); in bench_futex_wake()
211 free(worker); in bench_futex_wake()
Dfutex-requeue.c40 static pthread_t *worker; variable
138 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_requeue()
139 if (!worker) in bench_futex_requeue()
164 block_threads(worker, thread_attr, cpu); in bench_futex_requeue()
203 ret = pthread_join(worker[i], NULL); in bench_futex_requeue()
217 free(worker); in bench_futex_requeue()
Dfutex-wake-parallel.c40 pthread_t worker; member
109 if (pthread_create(&td[i].worker, &thread_attr, in wakeup_threads()
117 if (pthread_join(td[i].worker, NULL)) in wakeup_threads()
/Linux-v5.4/Documentation/core-api/
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
24 there is no work item left on the workqueue the worker becomes idle.
25 When a new work item gets queued, the worker begins executing again.
32 worker thread per CPU and a single threaded (ST) wq had one worker
42 worker pool. An MT wq could provide only one execution context per CPU
60 * Use per-CPU unified worker pools shared by all wq to provide
64 * Automatically regulate worker pool and level of concurrency so that
80 Special purpose threads, called worker threads, execute the functions
82 worker threads become idle. These worker threads are managed in so
[all …]
Derrseq.rst49 Let me tell you a story about a worker drone. Now, he's a good worker
114 Occasionally the big boss comes in for a spot check and asks the worker
115 to do a one-off job for him. He's not really watching the worker
119 He can just sample the current errseq_t in the worker, and then use that
/Linux-v5.4/samples/seccomp/
Duser-trap.c204 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-v5.4/drivers/thermal/intel/
Dintel_powerclamp.c77 struct kthread_worker *worker; member
405 kthread_queue_delayed_work(w_data->worker, in clamp_balancing_func()
437 kthread_queue_work(w_data->worker, &w_data->balancing_work); in clamp_idle_injection_func()
480 struct kthread_worker *worker; in start_power_clamp_worker() local
482 worker = kthread_create_worker_on_cpu(cpu, 0, "kidle_inj/%ld", cpu); in start_power_clamp_worker()
483 if (IS_ERR(worker)) in start_power_clamp_worker()
486 w_data->worker = worker; in start_power_clamp_worker()
491 sched_setscheduler(worker->task, SCHED_FIFO, &sparam); in start_power_clamp_worker()
495 kthread_queue_work(w_data->worker, &w_data->balancing_work); in start_power_clamp_worker()
502 if (!w_data->worker) in stop_power_clamp_worker()
[all …]
/Linux-v5.4/drivers/hid/
Dhid-bigbenff.c183 struct work_struct worker; member
190 struct bigben_device, worker); in bigben_worker()
238 schedule_work(&bigben->worker); in hid_bigben_play_effect()
270 schedule_work(&bigben->worker); in bigben_set_led()
301 cancel_work_sync(&bigben->worker); in bigben_remove()
342 INIT_WORK(&bigben->worker, bigben_worker); in bigben_probe()
381 schedule_work(&bigben->worker); in bigben_probe()
/Linux-v5.4/drivers/input/misc/
Dmsm-vibrator.c35 struct work_struct worker; member
119 worker); in msm_vibrator_worker()
141 schedule_work(&vibrator->worker); in msm_vibrator_play_effect()
150 cancel_work_sync(&vibrator->worker); in msm_vibrator_close()
208 INIT_WORK(&vibrator->worker, msm_vibrator_worker); in msm_vibrator_probe()
240 cancel_work_sync(&vibrator->worker); in msm_vibrator_suspend()
/Linux-v5.4/drivers/infiniband/core/
Dfmr_pool.c99 struct kthread_worker *worker; member
183 kthread_queue_work(pool->worker, &pool->work); in ib_fmr_cleanup_func()
253 pool->worker = in ib_create_fmr_pool()
255 if (IS_ERR(pool->worker)) { in ib_create_fmr_pool()
257 ret = PTR_ERR(pool->worker); in ib_create_fmr_pool()
325 kthread_destroy_worker(pool->worker); in ib_destroy_fmr_pool()
375 kthread_queue_work(pool->worker, &pool->work); in ib_flush_fmr_pool()
487 kthread_queue_work(pool->worker, &pool->work); in ib_fmr_pool_unmap()
/Linux-v5.4/drivers/gpu/drm/
Ddrm_flip_work.c110 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-v5.4/tools/testing/selftests/powerpc/tm/
Dtm-vmx-unavail.c27 void *worker(void *unused) in worker() function
104 pthread_create(&thread[i], NULL, &worker, NULL); in tm_vmx_unavail_test()
/Linux-v5.4/drivers/platform/olpc/
Dolpc-ec.c36 struct work_struct worker; member
80 struct olpc_ec_priv *ec = container_of(w, struct olpc_ec_priv, worker); in olpc_ec_worker()
106 schedule_work(&ec->worker); in olpc_ec_worker()
124 schedule_work(&ec->worker); in queue_ec_descriptor()
418 INIT_WORK(&ec->worker, olpc_ec_worker); in olpc_ec_probe()
/Linux-v5.4/drivers/macintosh/ams/
Dams-core.c65 schedule_work(&ams_info.worker); in ams_handle_irq()
185 INIT_WORK(&ams_info.worker, ams_worker); in ams_init()
216 flush_work(&ams_info.worker); in ams_sensor_detach()
/Linux-v5.4/arch/x86/kvm/
Di8254.c215 kthread_queue_work(pit->worker, &pit->expired); in kvm_pit_ack_irq()
275 kthread_queue_work(pt->worker, &pt->expired); in pit_timer_fn()
670 pit->worker = kthread_create_worker(0, "kvm-pit/%d", pid_nr); in kvm_create_pit()
671 if (IS_ERR(pit->worker)) in kvm_create_pit()
714 kthread_destroy_worker(pit->worker); in kvm_create_pit()
733 kthread_destroy_worker(pit->worker); in kvm_free_pit()
/Linux-v5.4/kernel/sched/
Dcpufreq_schedutil.c39 struct kthread_worker worker; member
583 kthread_queue_work(&sg_policy->worker, &sg_policy->work); in sugov_irq_work()
681 kthread_init_worker(&sg_policy->worker); in sugov_kthread_create()
682 thread = kthread_create(kthread_worker_fn, &sg_policy->worker, in sugov_kthread_create()
713 kthread_flush_worker(&sg_policy->worker); in sugov_kthread_stop()

1234