summaryrefslogtreecommitdiff
path: root/mm/zswap.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <quic_pkondeti@quicinc.com>2022-11-09 08:18:36 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-12-12 05:12:09 +0300
commitfd3b1bc3c86ee11ba77421b00c70280605b521c6 (patch)
tree1490c5c79822c59a0ebf51974b7a665f7efe7c97 /mm/zswap.c
parent4c9473e87e75a2a77ccd02e55c91ffe6a52b5df6 (diff)
downloadlinux-fd3b1bc3c86ee11ba77421b00c70280605b521c6.tar.xz
mm/madvise: fix madvise_pageout for private file mappings
When MADV_PAGEOUT is called on a private file mapping VMA region, we bail out early if the process is neither owner nor write capable of the file. However, this VMA may have both private/shared clean pages and private dirty pages. The opportunity of paging out the private dirty pages (Anon pages) is missed. Fix this behavior by allowing private file mappings pageout further and perform the file access check along with PageAnon() during page walk. We observe ~10% improvement in zram usage, thus leaving more available memory on a 4GB RAM system running Android. [quic_pkondeti@quicinc.com: v2] Link: https://lkml.kernel.org/r/1669962597-27724-1-git-send-email-quic_pkondeti@quicinc.com Link: https://lkml.kernel.org/r/1667971116-12900-1-git-send-email-quic_pkondeti@quicinc.com Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com> Cc: Charan Teja Kalla <quic_charante@quicinc.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/zswap.c')
0 files changed, 0 insertions, 0 deletions