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
  • kernel
  • padata.c
Find file BlameHistoryPermalink
  • Mathias Krause's avatar
    padata: make the sequence counter an atomic_t · 0b6b098e
    Mathias Krause authored Oct 25, 2013
    
    
    Using a spinlock to atomically increase a counter sounds wrong -- we've
    atomic_t for this!
    
    Also move 'seq_nr' to a different cache line than 'lock' to reduce cache
    line trashing. This has the nice side effect of decreasing the size of
    struct parallel_data from 192 to 128 bytes for a x86-64 build, e.g.
    occupying only two instead of three cache lines.
    
    Those changes results in a 5% performance increase on an IPsec test run
    using pcrypt.
    
    Btw. the seq_lock spinlock was never explicitly initialized -- one more
    reason to get rid of it.
    
    Signed-off-by: default avatarMathias Krause <mathias.krause@secunet.com>
    Acked-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    0b6b098e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7