Re: [PATCH UPDATED] workqueue: add documentation

From: Randy Dunlap
Date: Fri Sep 10 2010 - 13:45:13 EST


On Fri, 10 Sep 2010 16:55:21 +0200 Tejun Heo wrote:

> +3. The Design

> +Subsystems and drivers can create and queue work items through special
> +workqueue API functions as they see fit. They can influence some
> +aspects of the way the work items are executed by setting flags on the
> +workqueue they are putting the work item on. These flags include
> +things like cpu locality, reentrancy, concurrency limits and more. To

CPU

> +get a detailed overview refer to the API description of
> +alloc_workqueue() below.

> +4. Application Programming Interface (API)

> +@flags:
> +
> + WQ_NON_REENTRANT
> +
> + By default, a wq guarantees non-reentrance only on the same
> + CPU. A work may not be executed concurrently on the same CPU

work item

> + by multiple workers but is allowed to be executed concurrently
> + on multiple CPUs. This flag makes sure non-reentrance is
> + enforced across all CPUs. Work items queued to a
> + non-reentrant wq are guaranteed to be executed by at most one
> + worker system-wide at any given time.

> + WQ_CPU_INTENSIVE
> +
> + Work items of a CPU intensive wq do not contribute to the
> + concurrency level. In other words, Runnable CPU intensive

runnable

> + work items will not prevent other work items from starting
> + execution. This is useful for bound work items which are
> + expected to hog CPU cycles so that their execution is
> + regulated by the system scheduler.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/