Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • Documentation
  • core-api
  • workqueue.rst
Find file BlameHistoryPermalink
  • Boqun Feng's avatar
    workqueue: doc: Call out the non-reentrance conditions · f9eaaa82
    Boqun Feng authored Oct 22, 2021
    The current doc of workqueue API suggests that work items are
    non-reentrant: any work item is guaranteed to be executed by at most one
    worker system-wide at any given time. However this is not true, the
    following case can cause a work item W executed by two workers at
    the same time:
    
            queue_work_on(0, WQ1, W);
            // after a worker picks up W and clear the pending bit
            queue_work_on(1, WQ2, W);
            // workers on CPU0 and CPU1 will execute W in the same time.
    
    , which means the non-reentrance of a work item is conditional, and
    Lai Jiangshan provided a nice summary[1] of the conditions, therefore
    use it to describe a work item instance and improve the doc.
    
    [1]: https://lore.kernel.org/lkml/CAJhGHyDudet_xyNk=8xnuO2==o-u06s0E0GZVP4Q67nmQ84Ceg@mail.gmail.com/
    
    
    
    Suggested-by: default avatarMatthew Wilcox <willy@infradead.org>
    Suggested-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    f9eaaa82
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7