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
  • include
  • linux
  • compaction.h
Find file BlameHistoryPermalink
  • Vlastimil Babka's avatar
    mm, compaction: raise compaction priority after it withdrawns · 49433085
    Vlastimil Babka authored Sep 23, 2019
    Mike Kravetz reports that "hugetlb allocations could stall for minutes or
    hours when should_compact_retry() would return true more often then it
    should.  Specifically, this was in the case where compact_result was
    COMPACT_DEFERRED and COMPACT_PARTIAL_SKIPPED and no progress was being
    made."
    
    The problem is that the compaction_withdrawn() test in
    should_compact_retry() includes compaction outcomes that are only possible
    on low compaction priority, and results in a retry without increasing the
    priority.  This may result in furter reclaim, and more incomplete
    compaction attempts.
    
    With this patch, compaction priority is raised when possible, or
    should_compact_retry() returns false.
    
    The COMPACT_SKIPPED result doesn't really fit together with the other
    outcomes in compaction_withdrawn(), as that's a result caused by
    insufficient order-0 pages, not due to low compaction priority.  With this
    patch, it is moved to a new compaction_needs_reclaim() function, and for
    that outcome we keep the current logic of retrying if it looks like
    reclaim will be able to help.
    
    Link: http://lkml.kernel.org/r/20190806014744.15446-4-mike.kravetz@oracle.com
    
    
    Reported-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    Signed-off-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
    Tested-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
    Cc: Hillf Danton <hdanton@sina.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Michal Hocko <mhocko@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    49433085
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7