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
  • mm
  • page_alloc.c
Find file BlameHistoryPermalink
  • Huan Yang's avatar
    mm: page_alloc: simpify page del and expand · 94deaf69
    Huan Yang authored Aug 26, 2024
    When page del from buddy and need expand, it will account free_pages in
    zone's migratetype.
    
    The current way is to subtract the page number of the current order when
    deleting, and then add it back when expanding.
    
    This is unnecessary, as when migrating the same type, we can directly
    record the difference between the high-order pages and the expand added,
    and then subtract it directly.
    
    This patch merge that, only when del and expand done, then account
    free_pages.
    
    Link: https://lkml.kernel.org/r/20240826064048.187790-1-link@vivo.com
    
    
    Signed-off-by: default avatarHuan Yang <link@vivo.com>
    Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    94deaf69
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7