summaryrefslogtreecommitdiff
path: root/system/easy-kernel/0255-ultra-ksm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/easy-kernel/0255-ultra-ksm.patch')
-rw-r--r--system/easy-kernel/0255-ultra-ksm.patch74
1 files changed, 19 insertions, 55 deletions
diff --git a/system/easy-kernel/0255-ultra-ksm.patch b/system/easy-kernel/0255-ultra-ksm.patch
index 8011e2266..9ea6867fa 100644
--- a/system/easy-kernel/0255-ultra-ksm.patch
+++ b/system/easy-kernel/0255-ultra-ksm.patch
@@ -1,39 +1,6 @@
-From 4f10e65a3f482d3d2e07eab75a8c8610f59b8112 Mon Sep 17 00:00:00 2001
-From: Piotr Gorski <lucjan.lucjanov@gmail.com>
-Date: Mon, 1 Nov 2021 12:32:31 +0100
-Subject: [PATCH] UKSM for 5.15
-
-Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
----
- Documentation/vm/uksm.txt | 61 +
- fs/exec.c | 1 +
- fs/proc/meminfo.c | 4 +
- include/linux/ksm.h | 43 +-
- include/linux/mm_types.h | 3 +
- include/linux/mmzone.h | 3 +
- include/linux/pgtable.h | 17 +-
- include/linux/sradix-tree.h | 77 +
- include/linux/uksm.h | 149 +
- kernel/fork.c | 2 +-
- lib/Makefile | 2 +-
- lib/sradix-tree.c | 476 +++
- mm/Kconfig | 26 +
- mm/Makefile | 3 +-
- mm/ksm.c | 11 -
- mm/memory.c | 33 +-
- mm/mmap.c | 36 +
- mm/uksm.c | 5614 +++++++++++++++++++++++++++++++++++
- mm/vmstat.c | 3 +
- 19 files changed, 6538 insertions(+), 26 deletions(-)
- create mode 100644 Documentation/vm/uksm.txt
- create mode 100644 include/linux/sradix-tree.h
- create mode 100644 include/linux/uksm.h
- create mode 100644 lib/sradix-tree.c
- create mode 100644 mm/uksm.c
-
diff --git a/Documentation/vm/uksm.txt b/Documentation/vm/uksm.txt
new file mode 100644
-index 000000000..be19a3127
+index 000000000000..be19a3127001
--- /dev/null
+++ b/Documentation/vm/uksm.txt
@@ -0,0 +1,61 @@
@@ -99,7 +66,7 @@ index 000000000..be19a3127
+2016-09-10 UKSM 0.1.2.5 Fix a bug in dedup ratio calculation.
+2017-02-26 UKSM 0.1.2.6 Fix a bug in hugetlbpage handling and a race bug with page migration.
diff --git a/fs/exec.c b/fs/exec.c
-index a098c133d..da9985b3e 100644
+index a098c133d8d7..da9985b3e310 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -65,6 +65,7 @@
@@ -111,7 +78,7 @@ index a098c133d..da9985b3e 100644
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
-index 6fa761c9c..45fd59a0d 100644
+index 6fa761c9cc78..45fd59a0d85c 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -108,6 +108,10 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
@@ -126,7 +93,7 @@ index 6fa761c9c..45fd59a0d 100644
show_val_kb(m, "NFS_Unstable: ", 0);
show_val_kb(m, "Bounce: ",
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
-index 161e8164a..f0dbdf3c9 100644
+index 161e8164abcf..f0dbdf3c986a 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -21,20 +21,16 @@ struct mem_cgroup;
@@ -197,7 +164,7 @@ index 161e8164a..f0dbdf3c9 100644
+
#endif /* __LINUX_KSM_H */
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 7f8ee09c7..da86d7fc0 100644
+index 7f8ee09c711f..da86d7fc0ea3 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -385,6 +385,9 @@ struct vm_area_struct {
@@ -211,7 +178,7 @@ index 7f8ee09c7..da86d7fc0 100644
struct core_thread {
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
-index 6a1d79d84..4af26d848 100644
+index 6a1d79d84675..4af26d848c40 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -158,6 +158,9 @@ enum zone_stat_item {
@@ -225,7 +192,7 @@ index 6a1d79d84..4af26d848 100644
enum node_stat_item {
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
-index e24d2c992..8e9d8af58 100644
+index e24d2c992b11..8e9d8af58cf2 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -1137,13 +1137,26 @@ extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn,
@@ -267,7 +234,7 @@ index e24d2c992..8e9d8af58 100644
static inline unsigned long my_zero_pfn(unsigned long addr)
diff --git a/include/linux/sradix-tree.h b/include/linux/sradix-tree.h
new file mode 100644
-index 000000000..d71edba6b
+index 000000000000..d71edba6b63f
--- /dev/null
+++ b/include/linux/sradix-tree.h
@@ -0,0 +1,77 @@
@@ -350,7 +317,7 @@ index 000000000..d71edba6b
+#endif /* _LINUX_SRADIX_TREE_H */
diff --git a/include/linux/uksm.h b/include/linux/uksm.h
new file mode 100644
-index 000000000..bb8651f53
+index 000000000000..bb8651f534f2
--- /dev/null
+++ b/include/linux/uksm.h
@@ -0,0 +1,149 @@
@@ -504,7 +471,7 @@ index 000000000..bb8651f53
+#endif /* !CONFIG_UKSM */
+#endif /* __LINUX_UKSM_H */
diff --git a/kernel/fork.c b/kernel/fork.c
-index 38681ad44..af32e377d 100644
+index 38681ad44c76..af32e377dcb7 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -604,7 +604,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
@@ -517,7 +484,7 @@ index 38681ad44..af32e377d 100644
if (!(tmp->vm_flags & VM_WIPEONFORK))
retval = copy_page_range(tmp, mpnt);
diff --git a/lib/Makefile b/lib/Makefile
-index a841be524..446bb9818 100644
+index a841be5244ac..446bb9818b42 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -28,7 +28,7 @@ CFLAGS_string.o += -fno-stack-protector
@@ -531,7 +498,7 @@ index a841be524..446bb9818 100644
is_single_threaded.o plist.o decompress.o kobject_uevent.o \
diff --git a/lib/sradix-tree.c b/lib/sradix-tree.c
new file mode 100644
-index 000000000..ab21e6309
+index 000000000000..ab21e6309b93
--- /dev/null
+++ b/lib/sradix-tree.c
@@ -0,0 +1,476 @@
@@ -1012,7 +979,7 @@ index 000000000..ab21e6309
+ return 0;
+}
diff --git a/mm/Kconfig b/mm/Kconfig
-index d16ba9249..744b0ed24 100644
+index d16ba9249bc5..744b0ed24de0 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -301,6 +301,32 @@ config KSM
@@ -1049,7 +1016,7 @@ index d16ba9249..744b0ed24 100644
config DEFAULT_MMAP_MIN_ADDR
int "Low address space to protect from user allocation"
diff --git a/mm/Makefile b/mm/Makefile
-index fc60a40ce..69015e892 100644
+index fc60a40ce954..69015e892830 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -81,7 +81,8 @@ obj-$(CONFIG_SPARSEMEM) += sparse.o
@@ -1063,7 +1030,7 @@ index fc60a40ce..69015e892 100644
obj-$(CONFIG_SLAB) += slab.o
obj-$(CONFIG_SLUB) += slub.o
diff --git a/mm/ksm.c b/mm/ksm.c
-index a5716fdec..b8a7f01cd 100644
+index a5716fdec1aa..b8a7f01cd823 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -852,17 +852,6 @@ static int unmerge_ksm_pages(struct vm_area_struct *vma,
@@ -1085,7 +1052,7 @@ index a5716fdec..b8a7f01cd 100644
/*
* Only called through the sysfs control interface:
diff --git a/mm/memory.c b/mm/memory.c
-index c52be6d6b..c5512e697 100644
+index c52be6d6b605..c5512e69751c 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -157,6 +157,25 @@ EXPORT_SYMBOL(zero_pfn);
@@ -1173,7 +1140,7 @@ index c52be6d6b..c5512e697 100644
}
flush_cache_page(vma, vmf->address, pte_pfn(vmf->orig_pte));
diff --git a/mm/mmap.c b/mm/mmap.c
-index 88dcc5c25..b93c12938 100644
+index 88dcc5c25225..b93c12938b5f 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -46,6 +46,7 @@
@@ -1333,7 +1300,7 @@ index 88dcc5c25..b93c12938 100644
diff --git a/mm/uksm.c b/mm/uksm.c
new file mode 100644
-index 000000000..e4732c00b
+index 000000000000..e4732c00be69
--- /dev/null
+++ b/mm/uksm.c
@@ -0,0 +1,5614 @@
@@ -6952,7 +6919,7 @@ index 000000000..e4732c00b
+#endif
+
diff --git a/mm/vmstat.c b/mm/vmstat.c
-index 8ce262034..c0bc68578 100644
+index 8ce2620344b2..c0bc685782d1 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1237,6 +1237,9 @@ const char * const vmstat_text[] = {
@@ -6965,6 +6932,3 @@ index 8ce262034..c0bc68578 100644
/* enum writeback_stat_item counters */
"nr_dirty_threshold",
"nr_dirty_background_threshold",
---
-2.33.1.711.g9d530dc002
-