Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge n0kernel 16.1.0 #15

Merged
merged 113 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
01150c5
mm/page_alloc: bail out on fatal signal during reclaim/compaction ret…
Dec 22, 2024
a5df84d
mm: skip swap readahead when process is exiting
Dec 22, 2024
fe96ecb
mm: speed up mremap by 20x on large regions
joelagnel Jan 3, 2019
bd67640
arm64: mremap speedup - Enable HAVE_MOVE_PMD
Oct 14, 2020
3b8a9cf
mm: reference totalram_pages and managed_pages once per function
Dec 28, 2018
af3b08c
mm: convert zone->managed_pages to atomic variable
Dec 28, 2018
32fae38
mm: convert totalram_pages and totalhigh_pages variables to atomic
Dec 28, 2018
a968690
mm: remove managed_page_count_lock spinlock
Dec 28, 2018
165a29c
treewide: Fix totalram_pages and zone_managed_pages after the new cha…
EmanuelCN Dec 22, 2024
a6b83ca
mm: treewide: remove unused address argument from pte_alloc functions
joelagnel Jan 3, 2019
8958abd
mm,mremap: bail out earlier in mremap_to under map pressure
osalvadorvilardaga Mar 5, 2019
2ec7e47
mm/mmap.c: remove a never-triggered warning in __vma_adjust()
Dec 1, 2019
00d2ff3
mm/swap.c: piggyback lru_add_drain_all() calls
koct9i Dec 1, 2019
6dd6feb
mm/mmap.c: prev could be retrieved from vma->vm_prev
Dec 1, 2019
c68a982
mm/mmap.c: __vma_unlink_prev() is not necessary now
Dec 1, 2019
c6ce8a1
mm/mmap.c: extract __vma_unlink_list() as counterpart for __vma_link_…
Dec 1, 2019
53b6eff
mm/mmap.c: rb_parent is not necessary in __vma_link_list()
Dec 1, 2019
82e27df
mm/rmap.c: don't reuse anon_vma if we just want a copy
Dec 1, 2019
46a96e0
mm/mmap.c: use IS_ERR_VALUE to check return value of get_unmapped_area
Dec 1, 2019
4c994f9
mm/mmap.c: make vma_merge() comment more easy to understand
Dec 1, 2019
fc602bf
mm/mmap.c: get rid of odd jump labels in find_mergeable_anon_vma()
MiaoheLin Jan 31, 2020
50073a7
mmap: remove inline of vm_unmapped_area
Jaewon31Kim Apr 2, 2020
b47e4e8
mm: mmap: add trace point of vm_unmapped_area
Jaewon31Kim Apr 2, 2020
fe96b77
mm/mremap: add MREMAP_DONTUNMAP to mremap()
bgaff Apr 2, 2020
0ed295c
mm/vma: move VM_NO_KHUGEPAGED into generic header
Apr 2, 2020
7fe8c4f
mm/vma: make vma_is_foreign() available for general use
Apr 2, 2020
5f4cffd
mm/vma: make is_vma_temporary_stack() available for general use
Apr 2, 2020
dfb6851
mm/vma: make vma_is_accessible() available for general use
Apr 7, 2020
f3bfb71
mm/vma: append unlikely() while testing VMA access permissions
Apr 7, 2020
a51c682
mm: Fix MREMAP_DONTUNMAP accounting on VMA merge
bgaff Apr 17, 2020
7e1440e
userfaultfd: fix remap event with MREMAP_DONTUNMAP
bgaff May 14, 2020
612fe98
mm: mmap: fix a typo in comment "compatbility"->"compatibility"
Jun 4, 2020
baa592a
mm: use false for bool variable
SamuelZOU Jun 4, 2020
25904b4
mm/mmap: optimize a branch judgment in ksys_mmap_pgoff()
Aug 7, 2020
6e1d057
mm: mmap: merge vma after call_mmap() if possible
MiaoheLin Aug 7, 2020
2132b19
mm: remove unnecessary wrapper function do_mmap_pgoff()
pcc Aug 7, 2020
4433de1
mm/mremap: it is sure to have enough space when extent meets requirement
weiyang-linux Aug 7, 2020
6754b58
mm/mremap: calculate extent in one place
weiyang-linux Aug 7, 2020
1e6ef2e
mm/mremap: start addresses are properly aligned
weiyang-linux Aug 7, 2020
35caff2
mm: Introduce arch_validate_flags()
ctmarinas Nov 25, 2019
39453ab
mm: mmap: Fix general protection fault in unlink_file_vma()
MiaoheLin Oct 11, 2020
c8ced0c
mm/mmap: rename __vma_unlink_common() to __vma_unlink()
weiyang-linux Oct 13, 2020
0685cc7
mm/mmap: add inline vma_next() for readability of mmap code
howlett Oct 17, 2020
f48d040
mm/mmap: add inline munmap_vma_range() for code readability
howlett Oct 17, 2020
ffee630
mm/mmap.c: fix mmap return value when vma is merged after call_mmap()
Dec 6, 2020
75efd0f
mm/mremap: account memory on do_munmap() failure
0x7f454c46 Dec 15, 2020
9908451
mm/mremap: for MREMAP_DONTUNMAP check security_vm_enough_memory_mm()
0x7f454c46 Dec 15, 2020
19adc19
vm_ops: rename .split() callback to .may_split()
0x7f454c46 Dec 15, 2020
8e2cd4d
mremap: check if it's possible to split original vma
0x7f454c46 Dec 15, 2020
380b63f
mm/swap: Do not abuse the seqcount_t latching API
a-darwish Aug 27, 2020
0445b05
mm: mmap: fix fput in error path v2
ChristianKoenigAMD Oct 9, 2020
97365d9
mm: introduce vma_set_file function v5
ChristianKoenigAMD Sep 14, 2020
a059f13
mm: speedup mremap on 1GB or larger regions
Dec 15, 2020
bc6680c
arm64: mremap speedup - enable HAVE_MOVE_PUD
Dec 15, 2020
a59db69
mm/mremap.c: fix extent calculation
Dec 29, 2020
f79f078
mm/mremap: hold the rmap lock in write mode when moving page table en…
kvaneesh Jul 8, 2021
ea6a19f
mm/mremap: fix memory account on do_munmap() failure
Sep 2, 2021
71b93a8
mm/mremap: fix BUILD_BUG_ON() error in get_extent
arndb Feb 9, 2021
3cd7e53
mm: vmstat: use power efficient workingqueues
freak07 Feb 22, 2019
7c69e8d
mm/slub.c: branch optimization in free slowpath
Oct 13, 2020
ba0b3ed
arm64: Initialize jump labels before setup_machine_fdt()
bebarino Jun 2, 2022
7c1c8de
lib/string.c: simplify str[c]spn
Villemoes Apr 29, 2022
48f4f47
UPSTREAM: asm-generic/tlb: Guard with #ifdef CONFIG_MMU
wildea01 Aug 24, 2018
cdbbcb3
UPSTREAM: asm-generic/tlb: Track freeing of page-table directories in…
Aug 23, 2018
359b13f
UPSTREAM: asm-generic/tlb: Track which levels of the page tables have…
wildea01 Aug 23, 2018
d7d3aa3
BACKPORT: mm/memory: Move mmu_gather and TLB invalidation code into i…
Sep 3, 2018
3ba1320
UPSTREAM: asm-generic/tlb: Provide a comment
Sep 4, 2018
48bcd0b
BACKPORT: asm-generic/tlb, arch: Provide CONFIG_HAVE_MMU_GATHER_PAGE_…
Aug 31, 2018
f0960c5
UPSTREAM: asm-generic/tlb, arch: Provide generic VIPT cache flush
Aug 27, 2018
bd5d2aa
BACKPORT: x86/mm: Page size aware flush_tlb_mm_range()
Aug 26, 2018
9f576d8
BACKPORT: x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range
rikvanriel Sep 26, 2018
ffcdb0f
UPSTREAM: asm-generic/tlb, arch: Provide generic tlb_flush() based on…
Sep 4, 2018
dc92bad
UPSTREAM: asm-generic/tlb: Provide generic tlb_flush() based on flush…
Oct 11, 2018
ea5325b
UPSTREAM: asm-generic/tlb, ia64: Conditionally provide tlb_migrate_fi…
Sep 4, 2018
5d1ba8c
UPSTREAM: asm-generic/tlb, arch: Invert CONFIG_HAVE_RCU_TABLE_INVALIDATE
Sep 19, 2018
7925f1a
BACKPORT: arm/tlb: Convert to generic mmu_gather
Sep 4, 2018
4996190
BACKPORT: ia64/tlb: Convert to generic mmu_gather
Sep 4, 2018
f524d33
BACKPORT: sh/tlb: Convert SH to generic mmu_gather
Sep 4, 2018
d81619a
BACKPORT: um/tlb: Convert to generic mmu_gather
Sep 4, 2018
4b30bfa
BACKPORT: arch/tlb: Clean up simple architectures
Sep 4, 2018
fec357a
BACKPORT: asm-generic/tlb: Introduce CONFIG_HAVE_MMU_GATHER_NO_GATHER=y
Sep 18, 2018
ef45981
BACKPORT: s390/tlb: Convert to generic mmu_gather
Sep 18, 2018
368bd00
BACKPORT: asm-generic/tlb: Remove arch_tlb*_mmu()
Sep 20, 2018
39c5bb8
BACKPORT: asm-generic/tlb: Remove CONFIG_HAVE_GENERIC_MMU_GATHER
Sep 20, 2018
f07d6e0
BACKPORT: asm-generic/tlb: Remove tlb_flush_mmu_free()
Sep 20, 2018
1a0f5fb
BACKPORT: asm-generic/tlb: Remove tlb_table_flush()
Sep 20, 2018
dcbb5d0
BACKPORT: ia64/tlb: Eradicate tlb_migrate_finish() callback
Feb 19, 2019
34f829e
UPSTREAM: mm/tlb: Provide default nmi_uaccess_okay()
anadav Apr 26, 2019
2d8a861
BACKPORT: mm/mmu_gather: invalidate TLB correctly on batch allocation…
Feb 4, 2020
d4d66ab
mm: Handle MADV_WILLNEED through vfs_fadvise()
jankara Aug 29, 2019
a73520e
mm: split out a new pagewalk.h header from mm.h
Aug 28, 2019
64da4e7
pagewalk: separate function pointers from iterator data
Aug 28, 2019
796accc
mm/madvise: reduce code duplication in error handling paths
rppt Sep 23, 2019
b58c7ab
pidfd: add P_PIDFD to waitid()
Apr 29, 2020
2ee2ae5
mm: introduce MADV_COLD
minchank Sep 25, 2019
f1770fa
mm: introduce MADV_PAGEOUT
minchank Sep 25, 2019
9b30667
mm: factor out common parts between MADV_COLD and MADV_PAGEOUT
minchank Sep 25, 2019
c9ae6dd
mm: make do_madvise() available internally
axboe Dec 26, 2019
068ce54
mm: do not allow MADV_PAGEOUT for CoW pages
Mar 22, 2020
ce523cb
mm: check that mm is still valid in madvise()
torvalds Apr 24, 2020
b68537a
mm: madvise: fix vma user-after-free
yang-shi Sep 4, 2020
654aa62
mm: validate pmd after splitting
minchank Sep 15, 2020
0c11fce
mm/madvise: pass mm to do_madvise
minchank Oct 17, 2020
d9c160d
pid: move pidfd_get_pid() to pid.c
Apr 30, 2020
8a3a329
mm/madvise: introduce process_madvise() syscall: an external memory h…
minchank Oct 17, 2020
a4781c9
mm/madvise: fix memory leak from process_madvise
Nov 22, 2020
0a04004
mm/madvise: remove racy mm ownership check
minchank Dec 9, 2020
31c51c6
mm/madvise: replace ptrace attach requirement for process_madvise
surenbaghdasaryan Mar 13, 2021
00d638d
mm: madvise: return correct bytes advised with process_madvise
Mar 22, 2022
9111843
mm/madvise: fix madvise_pageout for private file mappings
Nov 9, 2022
68ae13e
mm/madvise: fix potential pte_unmap_unlock pte error
MiaoheLin Apr 29, 2022
4cdd247
mm: fix madivse_pageout mishandling on non-LRU page
minchank Sep 8, 2022
9fc0021
BACKPORT: mm: don't be stuck to rmap lock on reclaim path
minchank May 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions Documentation/core-api/cachetlb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ changes occur:
translations for software managed TLB configurations.
The sparc64 port currently does this.

6) ``void tlb_migrate_finish(struct mm_struct *mm)``

This interface is called at the end of an explicit
process migration. This interface provides a hook
to allow a platform to update TLB or context-specific
information for the address space.

The ia64 sn2 platform is one example of a platform
that uses this interface.

Next, we have the cache flushing interfaces. In general, when Linux
is changing an existing virtual-->physical mapping to a new value,
the sequence will be in one of the following forms::
Expand Down
17 changes: 16 additions & 1 deletion arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ config HAVE_ARCH_JUMP_LABEL
config HAVE_RCU_TABLE_FREE
bool

config HAVE_RCU_TABLE_INVALIDATE
config HAVE_MMU_GATHER_PAGE_SIZE
bool

config HAVE_MMU_GATHER_NO_GATHER
bool

config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
Expand Down Expand Up @@ -678,6 +681,18 @@ config HAVE_IRQ_TIME_ACCOUNTING
Archs need to ensure they use a high enough resolution clock to
support irq time accounting and then call enable_sched_clock_irqtime().

config HAVE_MOVE_PUD
bool
help
Architectures that select this are able to move page tables at the
PUD level. If there are only 3 page table levels, the move effectively
happens at the PGD level.

config HAVE_MOVE_PMD
bool
help
Archs that select this are able to move page tables at the PMD level.

config HAVE_ARCH_TRANSPARENT_HUGEPAGE
bool

Expand Down
1 change: 1 addition & 0 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ config ALPHA
select ODD_RT_SIGACTION
select OLD_SIGSUSPEND
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
select MMU_GATHER_NO_RANGE
help
The Alpha is a 64-bit general-purpose processor designed and
marketed by the Digital Equipment Corporation of blessed memory,
Expand Down
6 changes: 3 additions & 3 deletions arch/alpha/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pmd_free(struct mm_struct *mm, pmd_t *pmd)
}

static inline pte_t *
pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
pte_alloc_one_kernel(struct mm_struct *mm)
{
pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
return pte;
Expand All @@ -65,9 +65,9 @@ pte_free_kernel(struct mm_struct *mm, pte_t *pte)
}

static inline pgtable_t
pte_alloc_one(struct mm_struct *mm, unsigned long address)
pte_alloc_one(struct mm_struct *mm)
{
pte_t *pte = pte_alloc_one_kernel(mm, address);
pte_t *pte = pte_alloc_one_kernel(mm);
struct page *page;

if (!pte)
Expand Down
6 changes: 0 additions & 6 deletions arch/alpha/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
#ifndef _ALPHA_TLB_H
#define _ALPHA_TLB_H

#define tlb_start_vma(tlb, vma) do { } while (0)
#define tlb_end_vma(tlb, vma) do { } while (0)
#define __tlb_remove_tlb_entry(tlb, pte, addr) do { } while (0)

#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)

#include <asm-generic/tlb.h>

#define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)
Expand Down
3 changes: 3 additions & 0 deletions arch/alpha/include/uapi/asm/mman.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
#define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */
#define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */

#define MADV_COLD 20 /* deactivate these pages */
#define MADV_PAGEOUT 21 /* reclaim these pages */

/* compatibility flags */
#define MAP_FILE 0

Expand Down
5 changes: 2 additions & 3 deletions arch/arc/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ static inline int __get_order_pte(void)
return get_order(PTRS_PER_PTE * sizeof(pte_t));
}

static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
unsigned long address)
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
{
pte_t *pte;

Expand All @@ -102,7 +101,7 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
}

static inline pgtable_t
pte_alloc_one(struct mm_struct *mm, unsigned long address)
pte_alloc_one(struct mm_struct *mm)
{
pgtable_t pte_pg;
struct page *page;
Expand Down
32 changes: 0 additions & 32 deletions arch/arc/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,6 @@
#ifndef _ASM_ARC_TLB_H
#define _ASM_ARC_TLB_H

#define tlb_flush(tlb) \
do { \
if (tlb->fullmm) \
flush_tlb_mm((tlb)->mm); \
} while (0)

/*
* This pair is called at time of munmap/exit to flush cache and TLB entries
* for mappings being torn down.
* 1) cache-flush part -implemented via tlb_start_vma( ) for VIPT aliasing D$
* 2) tlb-flush part - implemted via tlb_end_vma( ) flushes the TLB range
*
* Note, read http://lkml.org/lkml/2004/1/15/6
*/
#ifndef CONFIG_ARC_CACHE_VIPT_ALIASING
#define tlb_start_vma(tlb, vma)
#else
#define tlb_start_vma(tlb, vma) \
do { \
if (!tlb->fullmm) \
flush_cache_range(vma, vma->vm_start, vma->vm_end); \
} while(0)
#endif

#define tlb_end_vma(tlb, vma) \
do { \
if (!tlb->fullmm) \
flush_tlb_range(vma, vma->vm_start, vma->vm_end); \
} while (0)

#define __tlb_remove_tlb_entry(tlb, ptep, address)

#include <linux/pagemap.h>
#include <asm-generic/tlb.h>

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static inline void clean_pte_table(pte_t *pte)
* +------------+
*/
static inline pte_t *
pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
pte_alloc_one_kernel(struct mm_struct *mm)
{
pte_t *pte;

Expand All @@ -93,7 +93,7 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
}

static inline pgtable_t
pte_alloc_one(struct mm_struct *mm, unsigned long addr)
pte_alloc_one(struct mm_struct *mm)
{
struct page *pte;

Expand Down
Loading