]> www.infradead.org Git - nvme.git/commitdiff
Merge tag 'mm-nonmm-stable-2024-07-21-15-07' of git://git.kernel.org/pub/scm/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Jul 2024 00:56:22 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Jul 2024 00:56:22 +0000 (17:56 -0700)
Pull non-MM updates from Andrew Morton:

 - In the series "treewide: Refactor heap related implementation",
   Kuan-Wei Chiu has significantly reworked the min_heap library code
   and has taught bcachefs to use the new more generic implementation.

 - Yury Norov's series "Cleanup cpumask.h inclusion in core headers"
   reworks the cpumask and nodemask headers to make things generally
   more rational.

 - Kuan-Wei Chiu has sent along some maintenance work against our
   sorting library code in the series "lib/sort: Optimizations and
   cleanups".

 - More library maintainance work from Christophe Jaillet in the series
   "Remove usage of the deprecated ida_simple_xx() API".

 - Ryusuke Konishi continues with the nilfs2 fixes and clanups in the
   series "nilfs2: eliminate the call to inode_attach_wb()".

 - Kuan-Ying Lee has some fixes to the gdb scripts in the series "Fix
   GDB command error".

 - Plus the usual shower of singleton patches all over the place. Please
   see the relevant changelogs for details.

* tag 'mm-nonmm-stable-2024-07-21-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (98 commits)
  ia64: scrub ia64 from poison.h
  watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
  tsacct: replace strncpy() with strscpy()
  lib/bch.c: use swap() to improve code
  test_bpf: convert comma to semicolon
  init/modpost: conditionally check section mismatch to __meminit*
  init: remove unused __MEMINIT* macros
  nilfs2: Constify struct kobj_type
  nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro
  math: rational: add missing MODULE_DESCRIPTION() macro
  lib/zlib: add missing MODULE_DESCRIPTION() macro
  fs: ufs: add MODULE_DESCRIPTION()
  lib/rbtree.c: fix the example typo
  ocfs2: add bounds checking to ocfs2_check_dir_entry()
  fs: add kernel-doc comments to ocfs2_prepare_orphan_dir()
  coredump: simplify zap_process()
  selftests/fpu: add missing MODULE_DESCRIPTION() macro
  compiler.h: simplify data_race() macro
  build-id: require program headers to be right after ELF header
  resource: add missing MODULE_DESCRIPTION()
  ...

26 files changed:
1  2 
MAINTAINERS
drivers/md/bcache/super.c
drivers/md/dm-vdo/repair.c
fs/bcachefs/clock.c
fs/bcachefs/clock_types.h
fs/bcachefs/ec.c
fs/bcachefs/util.c
fs/bcachefs/util.h
include/asm-generic/vmlinux.lds.h
include/linux/cacheinfo.h
include/linux/compiler.h
include/linux/cpu.h
include/linux/cpumask.h
include/linux/interrupt.h
include/linux/nvme-fc-driver.h
include/linux/pm_domain.h
include/linux/poison.h
include/linux/rcupdate.h
include/linux/sched.h
include/linux/workqueue.h
kernel/events/core.c
kernel/fork.c
lib/Kconfig.debug
lib/fortify_kunit.c
lib/test_bpf.c
tools/testing/selftests/proc/Makefile

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
index df3763c18c0e1f7500cf27e2811b6a6e08d811a5,18fab9c44b1b7d96cb2c3c939cf976c2bb1ad9e0..1d6b691e8da6e174e55fea67ae81c4a00d22c464
@@@ -15,15 -24,22 +24,20 @@@ static inline void io_timer_swp(void *l
  
  void bch2_io_timer_add(struct io_clock *clock, struct io_timer *timer)
  {
 -      size_t i;
+       const struct min_heap_callbacks callbacks = {
+               .less = io_timer_cmp,
+               .swp = io_timer_swp,
+       };
        spin_lock(&clock->timer_lock);
  
 -      if (time_after_eq((unsigned long) atomic64_read(&clock->now),
 -                        timer->expire)) {
 +      if (time_after_eq64((u64) atomic64_read(&clock->now), timer->expire)) {
                spin_unlock(&clock->timer_lock);
                timer->fn(timer);
                return;
        }
  
-       for (size_t i = 0; i < clock->timers.used; i++)
 -      for (i = 0; i < clock->timers.nr; i++)
++      for (size_t i = 0; i < clock->timers.nr; i++)
                if (clock->timers.data[i] == timer)
                        goto out;
  
@@@ -34,11 -50,17 +48,16 @@@ out
  
  void bch2_io_timer_del(struct io_clock *clock, struct io_timer *timer)
  {
 -      size_t i;
+       const struct min_heap_callbacks callbacks = {
+               .less = io_timer_cmp,
+               .swp = io_timer_swp,
+       };
        spin_lock(&clock->timer_lock);
  
-       for (size_t i = 0; i < clock->timers.used; i++)
 -      for (i = 0; i < clock->timers.nr; i++)
++      for (size_t i = 0; i < clock->timers.nr; i++)
                if (clock->timers.data[i] == timer) {
-                       heap_del(&clock->timers, i, io_timer_cmp, NULL);
+                       min_heap_del(&clock->timers, i, &callbacks, NULL);
                        break;
                }
  
@@@ -120,13 -144,25 +139,20 @@@ void bch2_kthread_io_clock_wait(struct 
        bch2_io_timer_del(clock, &wait.io_timer);
  }
  
 -static struct io_timer *get_expired_timer(struct io_clock *clock,
 -                                        unsigned long now)
 +static struct io_timer *get_expired_timer(struct io_clock *clock, u64 now)
  {
        struct io_timer *ret = NULL;
 -      spin_lock(&clock->timer_lock);
 -
+       const struct min_heap_callbacks callbacks = {
+               .less = io_timer_cmp,
+               .swp = io_timer_swp,
+       };
 -          time_after_eq(now, clock->timers.data[0]->expire)) {
+       if (clock->timers.nr &&
++          time_after_eq64(now, clock->timers.data[0]->expire)) {
+               ret = *min_heap_peek(&clock->timers);
+               min_heap_pop(&clock->timers, &callbacks, NULL);
+       }
  
-       if (clock->timers.used &&
-           time_after_eq64(now, clock->timers.data[0]->expire))
-               heap_pop(&clock->timers, ret, io_timer_cmp, NULL);
 -      spin_unlock(&clock->timer_lock);
 -
        return ret;
  }
  
@@@ -143,18 -177,17 +169,18 @@@ void __bch2_increment_clock(struct io_c
  
  void bch2_io_timers_to_text(struct printbuf *out, struct io_clock *clock)
  {
 -      unsigned long now;
 -      unsigned i;
 -
        out->atomic++;
        spin_lock(&clock->timer_lock);
 -      now = atomic64_read(&clock->now);
 +      u64 now = atomic64_read(&clock->now);
 +
 +      printbuf_tabstop_push(out, 40);
 +      prt_printf(out, "current time:\t%llu\n", now);
  
-       for (unsigned i = 0; i < clock->timers.used; i++)
 -      for (i = 0; i < clock->timers.nr; i++)
 -              prt_printf(out, "%ps:\t%li\n",
++      for (unsigned i = 0; i < clock->timers.nr; i++)
 +              prt_printf(out, "%ps %ps:\t%llu\n",
                       clock->timers.data[i]->fn,
 -                     clock->timers.data[i]->expire - now);
 +                     clock->timers.data[i]->fn2,
 +                     clock->timers.data[i]->expire);
        spin_unlock(&clock->timer_lock);
        --out->atomic;
  }
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3dde175f4108822336669f4b84b737605cd92f0b,286db104e054052e7111c2c3e9c68ddd5a628eda..108060612bb87566a004f98864ced3baf7922ac6
@@@ -3,8 -3,7 +3,8 @@@
  #define _LINUX_CACHEINFO_H
  
  #include <linux/bitops.h>
- #include <linux/cpumask.h>
 +#include <linux/cpuhplock.h>
+ #include <linux/cpumask_types.h>
  #include <linux/smp.h>
  
  struct device_node;
Simple merge
index a8926d0a28cdf4de2436ffacd56b1349428419e0,ea6ac8f98e4a4ccaab75a5587c4b0467d2a7f6a4..bdcec173244522d56b428265f3af0b1b0d0c32ef
@@@ -16,9 -16,7 +16,8 @@@
  
  #include <linux/node.h>
  #include <linux/compiler.h>
- #include <linux/cpumask.h>
  #include <linux/cpuhotplug.h>
 +#include <linux/cpuhplock.h>
  #include <linux/cpu_smt.h>
  
  struct device;
Simple merge
index 3a36e64119c8c64d8253279078426265df43c6b9,136a55455529eb8700f8e307645ddf94f679b2bf..bea39a0292eb4b5cfd95dc6ffa0530b42e44f33b
@@@ -5,8 -5,6 +5,7 @@@
  
  #include <linux/kernel.h>
  #include <linux/bitops.h>
- #include <linux/cpumask.h>
 +#include <linux/cleanup.h>
  #include <linux/irqreturn.h>
  #include <linux/irqnr.h>
  #include <linux/hardirq.h>
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/fork.c
Simple merge
Simple merge
Simple merge
diff --cc lib/test_bpf.c
Simple merge
Simple merge