mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
Merge branch 'mm-hotfixes-stable' into mm-stable in order to pick up
vmscan.c changes which are required by "memcg: bail out proactive reclaim when memcg is dying".
This commit is contained in:
3
.mailmap
3
.mailmap
@@ -176,6 +176,7 @@ Brian Cain <bcain@kernel.org> <bcain@quicinc.com>
|
||||
Brian King <brking@us.ibm.com>
|
||||
Brian Silverman <bsilver16384@gmail.com> <brian.silverman@bluerivertech.com>
|
||||
Bryan Tan <bryan-bt.tan@broadcom.com> <bryantan@vmware.com>
|
||||
Burak Emir <burak.emir@gmail.com> <bqe@google.com>
|
||||
Cai Huoqing <cai.huoqing@linux.dev> <caihuoqing@baidu.com>
|
||||
Casey Connolly <casey.connolly@linaro.org> <caleb.connolly@linaro.org>
|
||||
Casey Connolly <casey.connolly@linaro.org> <caleb@connolly.tech>
|
||||
@@ -648,6 +649,7 @@ Nicholas Piggin <npiggin@gmail.com> <npiggin@suse.de>
|
||||
Nicholas Piggin <npiggin@gmail.com> <nickpiggin@yahoo.com.au>
|
||||
Nicholas Piggin <npiggin@gmail.com> <piggin@cyberone.com.au>
|
||||
Nicolas Ferre <nicolas.ferre@microchip.com> <nicolas.ferre@atmel.com>
|
||||
Nico Pache <nico.pache@linux.dev> <npache@redhat.com>
|
||||
Nicolas Pitre <nico@fluxnic.net> <nicolas.pitre@linaro.org>
|
||||
Nicolas Pitre <nico@fluxnic.net> <nico@linaro.org>
|
||||
Nicolas Saenz Julienne <nsaenz@kernel.org> <nsaenzjulienne@suse.de>
|
||||
@@ -695,6 +697,7 @@ Paulo Alcantara <pc@manguebit.org> <palcantara@suse.com>
|
||||
Paulo Alcantara <pc@manguebit.org> <pc@manguebit.com>
|
||||
Pavankumar Kondeti <quic_pkondeti@quicinc.com> <pkondeti@codeaurora.org>
|
||||
Peter A Jonsson <pj@ludd.ltu.se>
|
||||
Peter Collingbourne <peter@pcc.me.uk> <pcc@google.com>
|
||||
Peter Hilber <peter.hilber@oss.qualcomm.com> <quic_philber@quicinc.com>
|
||||
Peter Oruba <peter.oruba@amd.com>
|
||||
Peter Oruba <peter@oruba.de>
|
||||
|
||||
@@ -4634,7 +4634,7 @@ F: rust/helpers/cpumask.c
|
||||
|
||||
BITMAP API [RUST]
|
||||
M: Alice Ryhl <aliceryhl@google.com>
|
||||
M: Burak Emir <bqe@google.com>
|
||||
M: Burak Emir <burak.emir@gmail.com>
|
||||
R: Yury Norov <yury.norov@gmail.com>
|
||||
S: Maintained
|
||||
F: lib/find_bit_benchmark_rust.rs
|
||||
@@ -17253,7 +17253,7 @@ M: Lorenzo Stoakes <ljs@kernel.org>
|
||||
R: Zi Yan <ziy@nvidia.com>
|
||||
R: Baolin Wang <baolin.wang@linux.alibaba.com>
|
||||
R: Liam R. Howlett <liam@infradead.org>
|
||||
R: Nico Pache <npache@redhat.com>
|
||||
R: Nico Pache <nico.pache@linux.dev>
|
||||
R: Ryan Roberts <ryan.roberts@arm.com>
|
||||
R: Dev Jain <dev.jain@arm.com>
|
||||
R: Barry Song <baohua@kernel.org>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// Copyright 2023 Google LLC
|
||||
// Authors: Ard Biesheuvel <ardb@google.com>
|
||||
// Peter Collingbourne <pcc@google.com>
|
||||
// Peter Collingbourne <peter@pcc.me.uk>
|
||||
|
||||
#include <linux/elf.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
@@ -63,7 +63,8 @@ EXPORT_SYMBOL(phys_ram_base);
|
||||
|
||||
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||
#define VMEMMAP_ADDR_ALIGN max(1ULL << SECTION_SIZE_BITS, \
|
||||
MAX_FOLIO_VMEMMAP_ALIGN)
|
||||
PFN_PHYS(MAX_FOLIO_VMEMMAP_ALIGN / \
|
||||
sizeof(struct page)))
|
||||
|
||||
unsigned long vmemmap_start_pfn __ro_after_init;
|
||||
EXPORT_SYMBOL(vmemmap_start_pfn);
|
||||
|
||||
@@ -4114,6 +4114,18 @@ static int __folio_split(struct folio *folio, unsigned int new_order,
|
||||
|
||||
remap_page(folio, 1 << old_order, ttu_flags);
|
||||
|
||||
/*
|
||||
* Drop the mapping while the inode is still pinned. @folio stays
|
||||
* locked and present in the page cache until the loop below, so
|
||||
* eviction cannot free the inode yet; @lock_at is not enough, it may
|
||||
* be a tail beyond EOF that the split already dropped from the page
|
||||
* cache. Nothing past this point may touch the inode or the mapping.
|
||||
*/
|
||||
if (mapping) {
|
||||
i_mmap_unlock_read(mapping);
|
||||
mapping = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unlock all after-split folios except the one containing
|
||||
* @lock_at page. If @folio is not split, it will be kept locked.
|
||||
|
||||
@@ -101,7 +101,11 @@ static inline void memcg1_remove_from_trees(struct mem_cgroup *memcg) {}
|
||||
static inline void memcg1_soft_limit_reset(struct mem_cgroup *memcg) {}
|
||||
static inline void memcg1_css_offline(struct mem_cgroup *memcg) {}
|
||||
|
||||
static inline bool memcg1_oom_prepare(struct mem_cgroup *memcg, bool *locked) { return true; }
|
||||
static inline bool memcg1_oom_prepare(struct mem_cgroup *memcg, bool *locked)
|
||||
{
|
||||
*locked = false;
|
||||
return true;
|
||||
}
|
||||
static inline void memcg1_oom_finish(struct mem_cgroup *memcg, bool locked) {}
|
||||
static inline void memcg1_oom_recover(struct mem_cgroup *memcg) {}
|
||||
|
||||
|
||||
@@ -425,6 +425,7 @@ void free_zone_device_folio(struct folio *folio)
|
||||
mem_cgroup_uncharge(folio);
|
||||
|
||||
if (folio_test_anon(folio)) {
|
||||
mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, -1);
|
||||
for (i = 0; i < nr; i++)
|
||||
__ClearPageAnonExclusive(folio_page(folio, i));
|
||||
}
|
||||
|
||||
@@ -595,7 +595,8 @@ static int __folio_migrate_mapping(struct address_space *mapping,
|
||||
/* No turning back from here */
|
||||
newfolio->index = folio->index;
|
||||
newfolio->mapping = folio->mapping;
|
||||
if (folio_test_anon(folio) && folio_test_large(folio))
|
||||
if (folio_test_anon(folio) && folio_test_large(folio) &&
|
||||
!folio_test_hugetlb(folio))
|
||||
mod_mthp_stat(folio_order(folio), MTHP_STAT_NR_ANON, 1);
|
||||
if (folio_test_swapbacked(folio))
|
||||
__folio_set_swapbacked(newfolio);
|
||||
|
||||
@@ -81,7 +81,8 @@ __page_reporting_request(struct page_reporting_dev_info *prdev)
|
||||
* now we are limiting this to running no more than once every
|
||||
* couple of seconds.
|
||||
*/
|
||||
schedule_delayed_work(&prdev->work, PAGE_REPORTING_DELAY);
|
||||
queue_delayed_work(system_freezable_wq, &prdev->work,
|
||||
PAGE_REPORTING_DELAY);
|
||||
}
|
||||
|
||||
/* notify prdev of free page reporting request */
|
||||
@@ -341,7 +342,8 @@ static void page_reporting_process(struct work_struct *work)
|
||||
*/
|
||||
state = atomic_cmpxchg(&prdev->state, state, PAGE_REPORTING_IDLE);
|
||||
if (state == PAGE_REPORTING_REQUESTED)
|
||||
schedule_delayed_work(&prdev->work, PAGE_REPORTING_DELAY);
|
||||
queue_delayed_work(system_freezable_wq, &prdev->work,
|
||||
PAGE_REPORTING_DELAY);
|
||||
}
|
||||
|
||||
static DEFINE_MUTEX(page_reporting_mutex);
|
||||
|
||||
12
mm/vmscan.c
12
mm/vmscan.c
@@ -4919,6 +4919,9 @@ static bool should_abort_scan(struct lruvec *lruvec, struct scan_control *sc)
|
||||
int i;
|
||||
enum zone_watermarks mark;
|
||||
|
||||
if (unlikely(sc->proactive && signal_pending(current)))
|
||||
return true;
|
||||
|
||||
if (sc->nr_reclaimed >= max(sc->nr_to_reclaim, compact_gap(sc->order)))
|
||||
return true;
|
||||
|
||||
@@ -7899,8 +7902,15 @@ int user_proactive_reclaim(char *buf,
|
||||
unsigned long batch_size = (nr_to_reclaim - nr_reclaimed) / 4;
|
||||
unsigned long reclaimed;
|
||||
|
||||
/*
|
||||
* Return -ERESTARTSYS to allow the freezer to interrupt the
|
||||
* task. The syscall will be transparently restarted upon
|
||||
* resume. For real signals, it either restarts the syscall
|
||||
* (if SA_RESTART is set) or is converted to -EINTR by the
|
||||
* signal layer.
|
||||
*/
|
||||
if (signal_pending(current))
|
||||
return -EINTR;
|
||||
return -ERESTARTSYS;
|
||||
|
||||
/*
|
||||
* This is the final attempt, drain percpu lru caches in the
|
||||
|
||||
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
FILE *f;
|
||||
char buf;
|
||||
char *line;
|
||||
char *line = NULL;
|
||||
int status;
|
||||
int ret = -1;
|
||||
size_t len = 0;
|
||||
|
||||
@@ -84,7 +84,7 @@ int get_proc_locked_vm_size(void)
|
||||
int get_proc_page_size(unsigned long addr)
|
||||
{
|
||||
FILE *smaps;
|
||||
char *line;
|
||||
char *line = NULL;
|
||||
unsigned long mmupage_size = 0;
|
||||
size_t size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user