-
由 Yu Zhao 提交于
mainline inclusion from mainline-v6.1-rc1 commit e1fd09e3 category: feature bugzilla: https://gitee.com/openeuler/open-source-summer/issues/I55Z0L CVE: NA Reference: https://android-review.googlesource.com/c/kernel/common/+/2050906/10 The MGLRU in the mainline version combines many other new features, especially folio. While this commit uses the version of MGLRU that did not have folio before, so there will be some differences in the code focusing on folio/page, and the core algorithm is consistent. ---------------------------------------------------------------------- Some architectures automatically set the accessed bit in PTEs, e.g., x86 and arm64 v8.2. On architectures that do not have this capability, clearing the accessed bit in a PTE usually triggers a page fault following the TLB miss of this PTE (to emulate the accessed bit). Being aware of this capability can help make better decisions, e.g., whether to spread the work out over a period of time to reduce bursty page faults when trying to clear the accessed bit in many PTEs. Note that theoretically this capability can be unreliable, e.g., hotplugged CPUs might be different from builtin ones. Therefore it should not be used in architecture-independent code that involves correctness, e.g., to determine whether TLB flushes are required (in combination with the accessed bit). Link: https://lore.kernel.org/r/20220309021230.721028-2-yuzhao@google.com/Signed-off-by: NYu Zhao <yuzhao@google.com> Reviewed-by: NBarry Song <baohua@kernel.org> Acked-by: NBrian Geffon <bgeffon@google.com> Acked-by: NJan Alexander Steffens (heftig) <heftig@archlinux.org> Acked-by: NOleksandr Natalenko <oleksandr@natalenko.name> Acked-by: NSteven Barrett <steven@liquorix.net> Acked-by: NSuleiman Souhlal <suleiman@google.com> Acked-by: NWill Deacon <will@kernel.org> Tested-by: NDaniel Byrne <djbyrne@mtu.edu> Tested-by: NDonald Carr <d@chaos-reins.com> Tested-by: NHolger Hoffstätte <holger@applied-asynchrony.com> Tested-by: NKonstantin Kharlamov <Hi-Angel@yandex.ru> Tested-by: NShuang Zhai <szhai2@cs.rochester.edu> Tested-by: NSofia Trinh <sofia.trinh@edi.works> Tested-by: NVaibhav Jain <vaibhav@linux.ibm.com> Bug: 227651406 Signed-off-by: NKalesh Singh <kaleshsingh@google.com> Change-Id: Ie81175d7e0d239f688d31487b298cf9b4fb66707 Signed-off-by: NYuLinjia <3110442349@qq.com>
b104fad3