• Home
  • Raw
  • Download

Lines Matching +full:idle +full:- +full:wait +full:- +full:delay

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * workqueue.h --- work queue handling for Linux.
28 #define work_data_bits(work) ((unsigned long *)(&(work)->data))
67 /* data contains off-queue information when !WORK_STRUCT_PWQ */
79 WORK_OFFQ_LEFT = BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT,
90 /* Convenience constants - of type 'unsigned long', not 'enum'! */
92 #define WORK_OFFQ_POOL_NONE ((1ul << WORK_OFFQ_POOL_BITS) - 1)
95 #define WORK_STRUCT_FLAG_MASK ((1ul << WORK_STRUCT_FLAG_BITS) - 1)
115 /* target workqueue and CPU ->timer uses to queue ->work */
124 /* target workqueue ->rcu uses to queue ->work */
140 * struct workqueue_attrs - A struct for workqueue attributes.
160 * @__pod_cpumask: internal attribute used to create per-pod pools
164 * Per-pod unbound worker pools are used to improve locality. Always a
165 * subset of ->cpumask. A workqueue can be associated with multiple
174 * If clear, workqueue will make a best-effort attempt at starting the
280 (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
281 lockdep_init_map(&(_work)->lockdep_map, "(work_completion)"#_work, (_key), 0); \
282 INIT_LIST_HEAD(&(_work)->entry); \
283 (_work)->func = (_func); \
289 (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
290 INIT_LIST_HEAD(&(_work)->entry); \
291 (_work)->func = (_func); \
313 INIT_WORK(&(_work)->work, (_func)); \
314 __init_timer(&(_work)->timer, \
321 INIT_WORK_ONSTACK(&(_work)->work, (_func)); \
322 __init_timer_on_stack(&(_work)->timer, \
340 INIT_WORK(&(_work)->work, (_func))
343 INIT_WORK_ONSTACK(&(_work)->work, (_func))
346 * work_pending - Find out whether a work item is currently pending
353 * delayed_work_pending - Find out whether a delayable work item is currently
358 work_pending(&(w)->work)
362 * Documentation/core-api/workqueue.rst.
373 * Per-cpu workqueues are generally preferred because they tend to
374 * show better performance thanks to cache locality. Per-cpu
379 * The scheduler considers a CPU idle if it doesn't have any task
380 * to execute and tries to keep idle cores idle to conserve power;
381 * however, for example, a per-cpu work item scheduled from an
382 * interrupt handler on an idle CPU will force the scheduler to
384 * turn may lead to more scheduling choices which are sub-optimal
387 * Workqueues marked with WQ_POWER_EFFICIENT are per-cpu by default
389 * specified. Per-cpu workqueues which are identified to
390 * contribute significantly to power-consumption are identified and
411 * System-wide workqueues which are always present.
414 * Multi-CPU multi-threaded. There are users which expect relatively
434 * they are same as their non-power-efficient counterparts - e.g.
447 * alloc_workqueue - allocate a workqueue
450 * @max_active: max in-flight work items per CPU, 0 for default
455 * Documentation/core-api/workqueue.rst.
464 * alloc_ordered_workqueue - allocate an ordered workqueue
501 struct delayed_work *work, unsigned long delay);
503 struct delayed_work *dwork, unsigned long delay);
537 * queue_work - queue work on a workqueue
546 * Memory-ordering properties: If it returns %true, guarantees that all stores
566 * queue_delayed_work - queue work on a workqueue after delay
569 * @delay: number of jiffies to wait before queueing
575 unsigned long delay) in queue_delayed_work() argument
577 return queue_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); in queue_delayed_work()
581 * mod_delayed_work - modify delay of or queue a delayed work
584 * @delay: number of jiffies to wait before queueing
590 unsigned long delay) in mod_delayed_work() argument
592 return mod_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); in mod_delayed_work()
596 * schedule_work_on - put work task on a specific cpu
608 * schedule_work - put work task in global workqueue
611 * Returns %false if @work was already on the kernel-global workqueue and
614 * This puts a job in the kernel-global workqueue if it was not already
615 * queued and leaves it in the same position on the kernel-global
618 * Shares the same memory-ordering properties of queue_work(), cf. the
627 * Detect attempt to flush system-wide workqueues at compile time when possible.
628 * Warn attempt to flush system-wide workqueues at runtime.
630 * See https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp
631 * for reasons and steps for converting system-wide workqueues into local workqueues.
634 __compiletime_warning("Please avoid flushing system-wide workqueues.");
666 * schedule_delayed_work_on - queue work in global workqueue on CPU after delay
669 * @delay: number of jiffies to wait
671 * After waiting for a given time this puts a job in the kernel-global
675 unsigned long delay) in schedule_delayed_work_on() argument
677 return queue_delayed_work_on(cpu, system_wq, dwork, delay); in schedule_delayed_work_on()
681 * schedule_delayed_work - put work task in global workqueue after delay
683 * @delay: number of jiffies to wait or 0 for immediate execution
685 * After waiting for a given time this puts a job in the kernel-global
689 unsigned long delay) in schedule_delayed_work() argument
691 return queue_delayed_work(system_wq, dwork, delay); in schedule_delayed_work()