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
  • lib
  • sbitmap.c
Find file BlameHistoryPermalink
  • Gabriel Krisman Bertazi's avatar
    sbitmap: Try each queue to wake up at least one waiter · 26edb30d
    Gabriel Krisman Bertazi authored Nov 15, 2022
    Jan reported the new algorithm as merged might be problematic if the
    queue being awaken becomes empty between the waitqueue_active inside
    sbq_wake_ptr check and the wake up.  If that happens, wake_up_nr will
    not wake up any waiter and we loose too many wake ups.  In order to
    guarantee progress, we need to wake up at least one waiter here, if
    there are any.  This now requires trying to wake up from every queue.
    
    Instead of walking through all the queues with sbq_wake_ptr, this call
    moves the wake up inside that function.  In a previous version of the
    patch, I found that updating wake_index several times when walking
    through queues had a measurable overhead.  This ensures we only update
    it once, at the end.
    
    Fixes: 4f8126bb
    
     ("sbitmap: Use single per-bitmap counting to wake up queued tags")
    Reported-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@suse.de>
    Reviewed-by: default avatarJan Kara <jack@suse.cz>
    Link: https://lore.kernel.org/r/20221115224553.23594-4-krisman@suse.de
    
    
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    26edb30d
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7