summaryrefslogtreecommitdiff
path: root/include/linux/memory-tiers.h
diff options
context:
space:
mode:
authorYin Fengwei <fengwei.yin@intel.com>2023-09-18 15:33:18 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-10-04 10:32:32 -0700
commitdc68badcede4ec3b4e5cdfcb8f678670220ac2ca (patch)
treec0142c7578ce22a8c35fd724935bcbb502162c64 /include/linux/memory-tiers.h
parent1acbc3f936146d1b34987294803ac131bc298ce8 (diff)
mm: mlock: update mlock_pte_range to handle large folio
Current kernel only lock base size folio during mlock syscall. Add large folio support with following rules: - Only mlock large folio when it's in VM_LOCKED VMA range and fully mapped to page table. fully mapped folio is required as if folio is not fully mapped to a VM_LOCKED VMA, if system is in memory pressure, page reclaim is allowed to pick up this folio, split it and reclaim the pages which are not in VM_LOCKED VMA. - munlock will apply to the large folio which is in VMA range or cross the VMA boundary. This is required to handle the case that the large folio is mlocked, later the VMA is split in the middle of large folio. Link: https://lkml.kernel.org/r/20230918073318.1181104-4-fengwei.yin@intel.com Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Cc: David Hildenbrand <david@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Yang Shi <shy828301@gmail.com> Cc: Yosry Ahmed <yosryahmed@google.com> Cc: Yu Zhao <yuzhao@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/memory-tiers.h')
0 files changed, 0 insertions, 0 deletions