Lines Matching full:workqueue

3  * kernel/workqueue.c - generic async execution with shared worker pool
25 * Please read Documentation/core-api/workqueue.rst for details.
34 #include <linux/workqueue.h>
206 * tools/workqueue/wq_monitor.py.
222 * The per-pool workqueue. While queued, the lower WORK_STRUCT_FLAG_BITS
229 struct workqueue_struct *wq; /* I: the owning workqueue */
271 * Structure used to wait for workqueue flush.
282 * The externally visible workqueue. It relays the issued work items to
314 char name[WQ_NAME_LEN]; /* I: workqueue name */
450 #include <trace/events/workqueue.h>
501 * for_each_pwq - iterate through all pool_workqueues of the specified workqueue
503 * @wq: the target workqueue
992 * before the original execution finishes, workqueue will identify the
1159 * should be using an unbound workqueue instead.
1206 …printk_deferred(KERN_WARNING "workqueue: %ps hogged CPU for >%luus %llu times, consider switching … in wq_cpu_intensive_report()
1388 * As this function doesn't involve any workqueue-related locking, it
1482 * decrement nr_in_flight of its pwq and handle workqueue flushing.
1663 * same workqueue.
1690 pr_warn_once("workqueue: round-robin CPU selection forced, expect performance impact\n"); in wq_select_unbound_cpu()
1723 * For a draining wq, only works from the same workqueue are in __queue_work()
1783 WARN_ONCE(true, "workqueue: per-cpu pwq for %s on cpu%d has 0 refcnt", in __queue_work()
1817 * @wq: workqueue to use
1878 * @wq: workqueue to use
1906 * If this is used with a per-cpu workqueue then the logic in in queue_work_node()
1970 * @wq: workqueue to use
2001 * @wq: workqueue to use
2048 * @wq: workqueue to use
2157 * create_worker - create a new workqueue worker
2177 pr_err_once("workqueue: Failed to allocate a worker ID: %pe\n", in create_worker()
2184 pr_err_once("workqueue: Failed to allocate a worker\n"); in create_worker()
2200 pr_err("workqueue: Interrupted when creating a worker thread \"kworker/%s\"\n", in create_worker()
2203 pr_err_once("workqueue: Failed to create a worker thread: %pe", in create_worker()
2644 pr_err("BUG: workqueue leaked lock or atomic: %s/0x%08x/%d\n" in process_one_work()
2726 * work items regardless of their specific target workqueue. The only
2737 /* tell the scheduler that this is a workqueue worker */ in worker_thread()
2810 * Workqueue rescuer thread function. There's one rescuer for each
2811 * workqueue which has WQ_MEM_RECLAIM set.
2844 * By the time the rescuer is requested to stop, the workqueue in rescuer_thread()
2872 * Slurp in all works issued via this workqueue and in rescuer_thread()
2943 * @target_wq: workqueue being flushed
2944 * @target_work: work item being flushed (NULL for workqueue flushes)
2948 * reclaiming memory or running on a workqueue which doesn't have
2964 "workqueue: PF_MEMALLOC task %d(%s) is flushing !WQ_MEM_RECLAIM %s:%ps", in check_flush_dependency()
2968 "workqueue: WQ_MEM_RECLAIM %s:%ps is flushing !WQ_MEM_RECLAIM %s:%ps", in check_flush_dependency()
3057 * flush_workqueue_prep_pwqs - prepare pwqs for workqueue flushing
3058 * @wq: workqueue being flushed
3062 * Prepare pwqs for workqueue flushing.
3129 * @wq: workqueue to flush
3286 * drain_workqueue - drain a workqueue
3287 * @wq: workqueue to drain
3289 * Wait until the workqueue becomes empty. While draining is in progress,
3327 pr_warn("workqueue %s: %s() isn't complete after %u tries\n", in drain_workqueue()
3376 * single-threaded or rescuer equipped workqueue. in start_flush_work()
3519 * another workqueue. On return from this function, @work is
3525 * The caller must ensure that the workqueue on which @work was last
3647 * system workqueue and blocks until all CPUs have completed.
3766 * Some attrs fields are workqueue-only. Clear them for worker_pool's. See the
4150 * workqueue's saved_max_active and activate inactive work items
4253 * @attrs: the wq_attrs of the default pwq of the target workqueue
4257 * Calculate the cpumask a workqueue with @attrs should use on @pod. If
4288 pr_warn_once("WARNING: workqueue cpumask: online intersect > " in wq_calc_pod_cpumask()
4311 struct workqueue_struct *wq; /* target workqueue */
4446 * apply_workqueue_attrs - apply new workqueue_attrs to an unbound workqueue
4447 * @wq: the target workqueue
4450 * Apply @attrs to an unbound workqueue @wq. Unless disabled, this function maps
4478 * @wq: the target workqueue
4491 * Note that when the last allowed CPU of a pod goes offline for a workqueue
4493 * executing the work items for the workqueue will lose their CPU affinity and
4495 * CPU_DOWN. If a workqueue user wants strict affinity, it's the user's
4530 pr_warn("workqueue: allocation failed while updating CPU pod affinity of \"%s\"\n", in wq_update_pod()
4587 "ordering guarantee broken for workqueue %s\n", wq->name); in alloc_and_link_pwqs()
4619 pr_warn("workqueue: max_active %d requested for %s is out of range, clamping between %d and %d\n", in wq_clamp_max_active()
4639 pr_err("workqueue: Failed to allocate a rescuer for wq \"%s\"\n", in init_rescuer()
4648 pr_err("workqueue: Failed to create a rescuer kthread for wq \"%s\": %pe", in init_rescuer()
4674 * workqueue, keep the previous behavior to avoid subtle breakages. in alloc_workqueue()
4771 * destroy_workqueue - safely terminate a workqueue
4772 * @wq: target workqueue
4774 * Safely destroy a workqueue. All work currently pending will be done first.
4787 /* mark the workqueue destruction is in progress */ in destroy_workqueue()
4859 * workqueue_set_max_active - adjust max_active of a workqueue
4860 * @wq: target workqueue
4893 * Determine if %current task is a workqueue worker and what it's working on.
4896 * Return: work struct if %current task is a workqueue worker, %NULL otherwise.
4907 * current_is_workqueue_rescuer - is %current workqueue rescuer?
4909 * Determine whether %current is a workqueue rescuer. Can be used from
4912 * Return: %true if %current is a workqueue rescuer. %false otherwise.
4922 * workqueue_congested - test whether a workqueue is congested
4924 * @wq: target workqueue
4926 * Test whether @wq's cpu workqueue for @cpu is congested. There is
4933 * pool_workqueues, each with its own congested state. A workqueue being
4934 * congested on one CPU doesn't mean that the workqueue is contested on any
5024 * name of the workqueue being serviced and worker description set with
5050 * Carefully copy the associated workqueue's workfn, name and desc. in print_worker_info()
5196 * show_one_workqueue - dump state of specified workqueue
5197 * @wq: workqueue whose state will be printed
5211 if (idle) /* Nothing to print for idle workqueue */ in show_one_workqueue()
5214 pr_info("workqueue %s: flags=0x%x\n", wq->name, wq->flags); in show_one_workqueue()
5289 * show_all_workqueues - dump workqueue state
5313 * show_freezable_workqueues - dump freezable workqueue state
5842 * by any subsequent write to workqueue/cpumask sysfs file. in workqueue_unbound_exclude_cpumask()
5908 * /sys/bus/workqueue/devices/WQ_NAME. All visible workqueues have the
5911 * per_cpu RO bool : whether the workqueue is per-cpu or unbound
6157 .name = "workqueue",
6286 * workqueue_sysfs_register - make a workqueue visible in sysfs
6287 * @wq: the workqueue to register
6289 * Expose @wq in sysfs under /sys/bus/workqueue/devices.
6293 * Workqueue user should use this function directly iff it wants to apply
6294 * workqueue_attrs before making the workqueue visible in sysfs; otherwise,
6355 * @wq: the workqueue to unregister
6374 * Workqueue watchdog.
6378 * indefinitely. Workqueue stalls can be very difficult to debug as the
6379 * usual warning mechanisms don't trigger and internal workqueue state is
6382 * Workqueue watchdog monitors all worker pools periodically and dumps
6387 * "workqueue.watchdog_thresh" which can be updated at runtime through the
6504 pr_emerg("BUG: workqueue lockup - pool"); in wq_watchdog_timer_fn()
6586 pr_warn("workqueue: Restricting unbound_cpumask (%*pb) with %s (%*pb) leaves no CPU, ignoring\n", in restrict_unbound_cpumask()
6595 * workqueue_init_early - early init for workqueue subsystem
6597 * This is the first step of three-staged workqueue subsystem initialization and
6620 restrict_unbound_cpumask("workqueue.unbound_cpus", &wq_cmdline_cpumask); in workqueue_init_early()
6739 * workqueue_init - bring workqueue subsystem fully online
6741 * This is the second step of three-staged workqueue subsystem initialization
6769 "workqueue: failed to create early rescuer for %s", in workqueue_init()
6855 * This is the third step of there-staged workqueue subsystem initialization and
6873 * worker pool. Explicitly call wq_update_pod() on all workqueue and CPU in workqueue_init_topology()
6896 pr_warn("workqueue.unbound_cpus: incorrect CPU range, using default\n"); in workqueue_unbound_cpus_setup()
6901 __setup("workqueue.unbound_cpus=", workqueue_unbound_cpus_setup);