diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2024-04-23 12:05:15 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-23 12:05:15 -0700 |
commit | 62071c2027900f6a019bbcc079e4590c2f659418 (patch) | |
tree | 8e482096ff2d02a15c26b8317d5d4a71d8310d44 | |
parent | d504cde6f666ac02cdc78f5ee948430df6d72f44 (diff) | |
download | 25-new-62071c2027900f6a019bbcc079e4590c2f659418.tar.gz |
foo
15 files changed, 255 insertions, 19 deletions
diff --git a/patches/mm-page_alloc-consolidate-free-page-accounting-fix-4.patch b/patches/mm-page_alloc-consolidate-free-page-accounting-fix-4.patch new file mode 100644 index 000000000..e364bf574 --- /dev/null +++ b/patches/mm-page_alloc-consolidate-free-page-accounting-fix-4.patch @@ -0,0 +1,53 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: mm: page_alloc: avoid defining unused function +Date: Tue, 23 Apr 2024 19:14:43 +0300 + +In some configurations I got mm/page_alloc.c:656:20: warning: unused +function 'add_to_free_list' [-Wunused-function] Because the only user is +guarded with a certain ifdeffery, do the same for add_to_free_list(). + +Link: https://lkml.kernel.org/r/20240423161506.2637177-1-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Baolin Wang <baolin.wang@linux.alibaba.com> +Cc: Johannes Weiner <hannes@cmpxchg.org> +Cc: Vlastimil Babka <vbabka@suse.cz> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + mm/page_alloc.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/mm/page_alloc.c~mm-page_alloc-consolidate-free-page-accounting-fix-4 ++++ a/mm/page_alloc.c +@@ -673,14 +673,6 @@ static inline void __add_to_free_list(st + area->nr_free++; + } + +-static inline void add_to_free_list(struct page *page, struct zone *zone, +- unsigned int order, int migratetype, +- bool tail) +-{ +- __add_to_free_list(page, zone, order, migratetype, tail); +- account_freepages(zone, 1 << order, migratetype); +-} +- + /* + * Used for pages which are on another list. Move the pages to the tail + * of the list - so the moved pages won't immediately be considered for +@@ -6770,6 +6762,14 @@ bool is_free_buddy_page(struct page *pag + EXPORT_SYMBOL(is_free_buddy_page); + + #ifdef CONFIG_MEMORY_FAILURE ++static inline void add_to_free_list(struct page *page, struct zone *zone, ++ unsigned int order, int migratetype, ++ bool tail) ++{ ++ __add_to_free_list(page, zone, order, migratetype, tail); ++ account_freepages(zone, 1 << order, migratetype); ++} ++ + /* + * Break down a higher-order page in sub-pages, and keep our target out of + * buddy allocator. +_ diff --git a/patches/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.patch b/patches/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.patch new file mode 100644 index 000000000..a2729b493 --- /dev/null +++ b/patches/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.patch @@ -0,0 +1,37 @@ +From: Stephen Rothwell <sfr@canb.auug.org.au> +Subject: writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2 +Date: Tue, 23 Apr 2024 10:22:53 +1000 + +fix build with CONFIG_CGROUP_WRITEBACK=n + +mm/backing-dev.c: In function 'wb_stats_show': +mm/backing-dev.c:175:33: error: 'struct bdi_writeback' has no member named = +'memcg_css' + 175 | cgroup_ino(wb->memcg_css->cgroup), + | ^~ + +Link: https://lkml.kernel.org/r/20240423102253.3675d0af@canb.auug.org.au +Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> +Cc: Kemeng Shi <shikemeng@huaweicloud.com> +Cc: Tejun Heo <tj@kernel.org> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + mm/backing-dev.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/mm/backing-dev.c~writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2 ++++ a/mm/backing-dev.c +@@ -172,7 +172,11 @@ static void wb_stats_show(struct seq_fil + "b_more_io: %10lu\n" + "b_dirty_time: %10lu\n" + "state: %10lx\n\n", ++#ifdef CONFIG_CGROUP_WRITEBACK + cgroup_ino(wb->memcg_css->cgroup), ++#else ++ (ino_t)0, ++#endif + K(stats->nr_writeback), + K(stats->nr_reclaimable), + K(stats->wb_thresh), +_ diff --git a/patches/xarray-dont-use-proxy-headers.patch b/patches/xarray-dont-use-proxy-headers.patch new file mode 100644 index 000000000..710d17f82 --- /dev/null +++ b/patches/xarray-dont-use-proxy-headers.patch @@ -0,0 +1,40 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: xarray: don't use "proxy" headers +Date: Tue, 23 Apr 2024 17:20:25 +0300 + +Update header inclusions to follow IWYU (Include What You Use) +principle. + +Link: https://lkml.kernel.org/r/20240423142204.2408923-3-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Matthew Wilcox (Oracle) <willy@infradead.org> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + include/linux/xarray.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/include/linux/xarray.h~xarray-dont-use-proxy-headers ++++ a/include/linux/xarray.h +@@ -12,14 +12,18 @@ + #include <linux/bitmap.h> + #include <linux/bug.h> + #include <linux/compiler.h> ++#include <linux/err.h> + #include <linux/gfp.h> + #include <linux/kconfig.h> +-#include <linux/kernel.h> ++#include <linux/limits.h> ++#include <linux/lockdep.h> + #include <linux/rcupdate.h> + #include <linux/sched/mm.h> + #include <linux/spinlock.h> + #include <linux/types.h> + ++struct list_lru; ++ + /* + * The bottom two bits of the entry determine how the XArray interprets + * the contents: +_ diff --git a/patches/xarray-use-bits_per_longs.patch b/patches/xarray-use-bits_per_longs.patch new file mode 100644 index 000000000..2bee44294 --- /dev/null +++ b/patches/xarray-use-bits_per_longs.patch @@ -0,0 +1,38 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: xarray: use BITS_PER_LONGS() +Date: Tue, 23 Apr 2024 17:20:24 +0300 + +Patch series "xarray: Clean up xarray.h". + +Main portion of this change is to get rid of kernel.h included into other +globally available headers. This decreases a dependency hell degree. The +first patch makes it possible to avoid math.h to be included as bitops.h +is implied by bitmap.h. + + +This patch (of 2): + +Use BITS_PER_LONGS() instead of open coded variant. + +Link: https://lkml.kernel.org/r/20240423142204.2408923-2-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Matthew Wilcox (Oracle) <willy@infradead.org> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + include/linux/xarray.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/xarray.h~xarray-use-bits_per_longs ++++ a/include/linux/xarray.h +@@ -1146,7 +1146,7 @@ static inline void xa_release(struct xar + #define XA_CHUNK_SIZE (1UL << XA_CHUNK_SHIFT) + #define XA_CHUNK_MASK (XA_CHUNK_SIZE - 1) + #define XA_MAX_MARKS 3 +-#define XA_MARK_LONGS DIV_ROUND_UP(XA_CHUNK_SIZE, BITS_PER_LONG) ++#define XA_MARK_LONGS BITS_TO_LONGS(XA_CHUNK_SIZE) + + /* + * @count is the count of every non-NULL element in the ->slots array +_ diff --git a/pc/devel-series b/pc/devel-series index cecf1dfcc..756e52dbd 100644 --- a/pc/devel-series +++ b/pc/devel-series @@ -292,6 +292,8 @@ mm-page_alloc-consolidate-free-page-accounting.patch mm-page_alloc-consolidate-free-page-accounting-fix.patch mm-page_alloc-consolidate-free-page-accounting-fix-2.patch mm-page_alloc-consolidate-free-page-accounting-fix-3.patch +mm-page_alloc-consolidate-free-page-accounting-fix-4.patch +# # mm-page_alloc-change-move_freepages-to-__move_freepages_block.patch # @@ -677,8 +679,10 @@ mm-memory-add-any_dirty-optional-pointer-to-folio_pte_batch.patch mm-madvise-optimize-lazyfreeing-with-mthp-in-madvise_free.patch # writeback-collect-stats-of-all-wb-of-bdi-in-bdi_debug_stats_show.patch +#writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi.patch: TBU writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi.patch writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix.patch +writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.patch writeback-add-wb_monitorpy-script-to-monitor-writeback-info-on-bdi.patch writeback-rename-nr_reclaimable-to-nr_dirty-in-balance_dirty_pages.patch # @@ -692,6 +696,10 @@ mm-memory-check-userfaultfd_wp-in-vmf_orig_pte_uffd_wp.patch # memcg-simple-cleanup-of-stats-update-functions.patch # +xarray-use-bits_per_longs.patch +xarray-dont-use-proxy-headers.patch +# +# # # # @@ -850,4 +858,5 @@ crash-add-prefix-for-crash-dumping-messages.patch binfmt_elf_fdpic-fix-proc-pid-auxv.patch binfmt_elf_fdpic-fix-proc-pid-auxv-checkpatch-fixes.patch # +# #ENDBRANCH mm-nonmm-unstable diff --git a/pc/mm-page_alloc-consolidate-free-page-accounting-fix-4.pc b/pc/mm-page_alloc-consolidate-free-page-accounting-fix-4.pc new file mode 100644 index 000000000..5a02802e5 --- /dev/null +++ b/pc/mm-page_alloc-consolidate-free-page-accounting-fix-4.pc @@ -0,0 +1 @@ +mm/page_alloc.c diff --git a/pc/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.pc b/pc/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.pc new file mode 100644 index 000000000..671f14319 --- /dev/null +++ b/pc/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.pc @@ -0,0 +1 @@ +mm/backing-dev.c diff --git a/pc/xarray-dont-use-proxy-headers.pc b/pc/xarray-dont-use-proxy-headers.pc new file mode 100644 index 000000000..0597a33fa --- /dev/null +++ b/pc/xarray-dont-use-proxy-headers.pc @@ -0,0 +1 @@ +include/linux/xarray.h diff --git a/pc/xarray-use-bits_per_longs.pc b/pc/xarray-use-bits_per_longs.pc new file mode 100644 index 000000000..0597a33fa --- /dev/null +++ b/pc/xarray-use-bits_per_longs.pc @@ -0,0 +1 @@ +include/linux/xarray.h diff --git a/txt/mm-page_alloc-consolidate-free-page-accounting-fix-4.txt b/txt/mm-page_alloc-consolidate-free-page-accounting-fix-4.txt new file mode 100644 index 000000000..bf6973376 --- /dev/null +++ b/txt/mm-page_alloc-consolidate-free-page-accounting-fix-4.txt @@ -0,0 +1,14 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: mm: page_alloc: avoid defining unused function +Date: Tue, 23 Apr 2024 19:14:43 +0300 + +In some configurations I got mm/page_alloc.c:656:20: warning: unused +function 'add_to_free_list' [-Wunused-function] Because the only user is +guarded with a certain ifdeffery, do the same for add_to_free_list(). + +Link: https://lkml.kernel.org/r/20240423161506.2637177-1-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Baolin Wang <baolin.wang@linux.alibaba.com> +Cc: Johannes Weiner <hannes@cmpxchg.org> +Cc: Vlastimil Babka <vbabka@suse.cz> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> diff --git a/txt/mm-swapfile-check-usable-swap-device-in-__folio_throttle_swaprate.txt b/txt/mm-swapfile-check-usable-swap-device-in-__folio_throttle_swaprate.txt index 65cc6c631..23bd69508 100644 --- a/txt/mm-swapfile-check-usable-swap-device-in-__folio_throttle_swaprate.txt +++ b/txt/mm-swapfile-check-usable-swap-device-in-__folio_throttle_swaprate.txt @@ -3,15 +3,15 @@ Subject: mm: swapfile: check usable swap device in __folio_throttle_swaprate() Date: Thu, 18 Apr 2024 21:56:44 +0800 Skip blk_cgroup_congested() if there is no usable swap device since no -swapin/out will occur, Thereby avoid taking swap_lock. The difference is -shown below from perf date of CoW pagefault, +swapin/out will occur, Thereby avoid taking swap_lock. The difference +is shown below from perf date of CoW pagefault, - perf report -g -i perf.data.swapoff | egrep "blk_cgroup_congested|__folio_throttle_swaprate" - 1.01% 0.16% page_fault2_pro [kernel.kallsyms] [k] __folio_throttle_swaprate - 0.83% 0.80% page_fault2_pro [kernel.kallsyms] [k] blk_cgroup_congested + perf report -g -i perf.data.swapon | egrep "blk_cgroup_congested|__folio_throttle_swaprate" + 1.01% 0.16% page_fault2_pro [kernel.kallsyms] [k] __folio_throttle_swaprate + 0.83% 0.80% page_fault2_pro [kernel.kallsyms] [k] blk_cgroup_congested - perf report -g -i perf.data.swapon | egrep "blk_cgroup_congested|__folio_throttle_swaprate" - 0.15% 0.15% page_fault2_pro [kernel.kallsyms] [k] __folio_throttle_swaprate + perf report -g -i perf.data.swapoff | egrep "blk_cgroup_congested|__folio_throttle_swaprate" + 0.15% 0.15% page_fault2_pro [kernel.kallsyms] [k] __folio_throttle_swaprate Link: https://lkml.kernel.org/r/20240418135644.2736748-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> diff --git a/txt/ocfs2-fix-races-between-hole-punching-and-aiodio.txt b/txt/ocfs2-fix-races-between-hole-punching-and-aiodio.txt index 40c54089c..9b2078301 100644 --- a/txt/ocfs2-fix-races-between-hole-punching-and-aiodio.txt +++ b/txt/ocfs2-fix-races-between-hole-punching-and-aiodio.txt @@ -9,19 +9,13 @@ fstests/generic/300 become from always failed to sometimes failed: [ 473.293420 ] run fstests generic/300 [ 475.296983 ] JBD2: Ignoring recovery information on journal -[ 475.302473 ] ocfs2: Mounting device (253,1) on (node local, slot 0) -with ordered data mode. -[ 494.290998 ] OCFS2: ERROR (device dm-1): ocfs2_change_extent_flag: -Owner 5668 has an extent at cpos 78723 which can no longer be found -[ 494.291609 ] On-disk corruption discovered. Please run fsck.ocfs2 -once the filesystem is unmounted. +[ 475.302473 ] ocfs2: Mounting device (253,1) on (node local, slot 0) with ordered data mode. +[ 494.290998 ] OCFS2: ERROR (device dm-1): ocfs2_change_extent_flag: Owner 5668 has an extent at cpos 78723 which can no longer be found +[ 494.291609 ] On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. [ 494.292018 ] OCFS2: File system is now read-only. -[ 494.292224 ] (kworker/19:11,2628,19):ocfs2_mark_extent_written:5272 -ERROR: status = -30 -[ 494.292602 ] (kworker/19:11,2628,19):ocfs2_dio_end_io_write:2374 -ERROR: status = -3 -fio: io_u error on file /mnt/scratch/racer: Read-only file system: write -offset=460849152, buflen=131072 +[ 494.292224 ] (kworker/19:11,2628,19):ocfs2_mark_extent_written:5272 ERROR: status = -30 +[ 494.292602 ] (kworker/19:11,2628,19):ocfs2_dio_end_io_write:2374 ERROR: status = -3 +fio: io_u error on file /mnt/scratch/racer: Read-only file system: write offset=460849152, buflen=131072 ========================================================================= In __blockdev_direct_IO, ocfs2_dio_wr_get_block is called to add unwritten diff --git a/txt/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.txt b/txt/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.txt new file mode 100644 index 000000000..a523a9146 --- /dev/null +++ b/txt/writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2.txt @@ -0,0 +1,16 @@ +From: Stephen Rothwell <sfr@canb.auug.org.au> +Subject: writeback-support-retrieving-per-group-debug-writeback-stats-of-bdi-fix-2 +Date: Tue, 23 Apr 2024 10:22:53 +1000 + +fix build with CONFIG_CGROUP_WRITEBACK=n + +mm/backing-dev.c: In function 'wb_stats_show': +mm/backing-dev.c:175:33: error: 'struct bdi_writeback' has no member named = +'memcg_css' + 175 | cgroup_ino(wb->memcg_css->cgroup), + | ^~ + +Link: https://lkml.kernel.org/r/20240423102253.3675d0af@canb.auug.org.au +Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> +Cc: Kemeng Shi <shikemeng@huaweicloud.com> +Cc: Tejun Heo <tj@kernel.org> diff --git a/txt/xarray-dont-use-proxy-headers.txt b/txt/xarray-dont-use-proxy-headers.txt new file mode 100644 index 000000000..79b9fb071 --- /dev/null +++ b/txt/xarray-dont-use-proxy-headers.txt @@ -0,0 +1,11 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: xarray: don't use "proxy" headers +Date: Tue, 23 Apr 2024 17:20:25 +0300 + +Update header inclusions to follow IWYU (Include What You Use) +principle. + +Link: https://lkml.kernel.org/r/20240423142204.2408923-3-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Matthew Wilcox (Oracle) <willy@infradead.org> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> diff --git a/txt/xarray-use-bits_per_longs.txt b/txt/xarray-use-bits_per_longs.txt new file mode 100644 index 000000000..997455e1d --- /dev/null +++ b/txt/xarray-use-bits_per_longs.txt @@ -0,0 +1,20 @@ +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Subject: xarray: use BITS_PER_LONGS() +Date: Tue, 23 Apr 2024 17:20:24 +0300 + +Patch series "xarray: Clean up xarray.h". + +Main portion of this change is to get rid of kernel.h included into other +globally available headers. This decreases a dependency hell degree. The +first patch makes it possible to avoid math.h to be included as bitops.h +is implied by bitmap.h. + + +This patch (of 2): + +Use BITS_PER_LONGS() instead of open coded variant. + +Link: https://lkml.kernel.org/r/20240423142204.2408923-2-andriy.shevchenko@linux.intel.com +Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> +Cc: Matthew Wilcox (Oracle) <willy@infradead.org> +Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> |