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
You need to sign in or sign up before continuing.
  • linux
  • ipc
  • mqueue.c
Find file BlameHistoryPermalink
  • Davidlohr Bueso's avatar
    ipc/mqueue: optimize msg_get() · a5091fda
    Davidlohr Bueso authored May 14, 2019
    Our msg priorities became an rbtree as of d6629859 ("ipc/mqueue:
    improve performance of send/recv").  However, consuming a msg in
    msg_get() remains logarithmic (still being better than the case before
    of course).  By applying well known techniques to cache pointers we can
    have the node with the highest priority in O(1), which is specially nice
    for the rt cases.  Furthermore, some callers can call msg_get() in a
    loop.
    
    A new msg_tree_erase() helper is also added to encapsulate the tree
    removal and node_cache game.  Passes ltp mq testcases.
    
    Link: http://lkml.kernel.org/r/20190321190216.1719-2-dave@stgolabs.net
    
    
    Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
    Cc: Manfred Spraul <manfred@colorfullife.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    a5091fda
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7