diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2025-09-21 14:19:36 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-21 14:19:36 -0700 |
| commit | bc9950b56f16e9cc53879118bfddcc175355a75a (patch) | |
| tree | 484cc703bc50a82af45288fffdf92c8a03debf27 /include/linux/swap.h | |
| parent | 103e90626d3a4032d22e8b09ff14600e71cda59c (diff) | |
| parent | ce4be9e4307c5a60701ff6e0cafa74caffdc54ce (diff) | |
| download | linux-next-bc9950b56f16e9cc53879118bfddcc175355a75a.tar.gz linux-next-bc9950b56f16e9cc53879118bfddcc175355a75a.zip | |
Merge branch 'mm-hotfixes-stable' into mm-stable in order to pick up
changes required by mm-stable material: hugetlb and damon.
Diffstat (limited to 'include/linux/swap.h')
| -rw-r--r-- | include/linux/swap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h index c2da85cb7fe7..a2bb20841616 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -381,6 +381,16 @@ void folio_add_lru_vma(struct folio *, struct vm_area_struct *); void mark_page_accessed(struct page *); void folio_mark_accessed(struct folio *); +static inline bool folio_may_be_lru_cached(struct folio *folio) +{ + /* + * Holding PMD-sized folios in per-CPU LRU cache unbalances accounting. + * Holding small numbers of low-order mTHP folios in per-CPU LRU cache + * will be sensible, but nobody has implemented and tested that yet. + */ + return !folio_test_large(folio); +} + extern atomic_t lru_disable_count; static inline bool lru_cache_disabled(void) |
