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
  • arch
  • powerpc
  • lib
  • code-patching.c
Find file BlameHistoryPermalink
  • Christophe Leroy's avatar
    powerpc/code-patching: Speed up page mapping/unmapping · 8b4bb0ad
    Christophe Leroy authored Aug 15, 2022
    Since commit 591b4b26
    
     ("powerpc/code-patching: Pre-map patch area")
    the patch area is premapped so intermediate page tables are already
    allocated.
    
    Use __set_pte_at() directly instead of the heavy map_kernel_page(),
    at for unmapping just do a pte_clear() followed by a flush.
    
    __set_pte_at() can be used directly without the filters in
    set_pte_at() because we are mapping a normal page non executable.
    
    Make sure gcc knows text_poke_area is page aligned in order to
    optimise the flush.
    
    This change reduces by 66% the time needed to activate ftrace on
    an 8xx (588000 tb ticks instead of 1744000).
    
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
    [mpe: Add ptesync needed on radix to avoid spurious fault]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20220815114840.1468656-1-mpe@ellerman.id.au
    8b4bb0ad
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7