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
  • include
  • linux
  • blkdev.h
Find file BlameHistoryPermalink
  • Dawei Li's avatar
    block: simplify blksize_bits() implementation · adff2158
    Dawei Li authored Oct 30, 2022
    
    
    Convert current looping-based implementation into bit operation,
    which can bring improvement for:
    
    1) bitops is more efficient for its arch-level optimization.
    
    2) Given that blksize_bits() is inline, _if_ @size is compile-time
    constant, it's possible that order_base_2() _may_ make output
    compile-time evaluated, depending on code context and compiler behavior.
    
    Signed-off-by: default avatarDawei Li <set_pte_at@outlook.com>
    Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
    Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Link: https://lore.kernel.org/r/TYCP286MB23238842958D7C083D6B67CECA349@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
    
    
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    adff2158
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7