Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-rm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-rm
  • Repository
Switch branch/tag
  • linux-rm
  • mm
  • madvise.c
Find file BlameHistoryPermalink
  • zhangkui's avatar
    mm/madvise: add MADV_WILLNEED to process_madvise() · d5fffc5a
    zhangkui authored Sep 02, 2021
    There is a usecase in Android that an app process's memory is swapped out
    by process_madvise() with MADV_PAGEOUT, such as the memory is swapped to
    zram or a backing device.  When the process is scheduled to running, like
    switch to foreground, multiple page faults may cause the app dropped
    frames.
    
    To reduce the problem, System Management Software can read-ahead memory
    of the process immediately when the app switches to forground.  Calling
    process_madvise() with MADV_WILLNEED can meet this need.
    
    Link: https://lkml.kernel.org/r/20210804082010.12482-1-zhangkui@oppo.com
    
    
    Signed-off-by: default avatarzhangkui <zhangkui@oppo.com>
    Cc: David Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    d5fffc5a