linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/15] treewide: Refactor heap related implementation
@ 2024-03-20 14:54 Kuan-Wei Chiu
  2024-03-20 14:54 ` [PATCH v2 01/15] perf/core: Fix several typos Kuan-Wei Chiu
                   ` (15 more replies)
  0 siblings, 16 replies; 35+ messages in thread
From: Kuan-Wei Chiu @ 2024-03-20 14:54 UTC (permalink / raw)
  To: colyli, kent.overstreet, msakai, peterz, mingo, acme, namhyung, akpm
  Cc: bfoster, mark.rutland, alexander.shishkin, jolsa, irogers,
	adrian.hunter, jserv, dm-devel, linux-bcache, linux-kernel,
	linux-bcachefs, linux-perf-users, Kuan-Wei Chiu

This patch series focuses on several adjustments related to heap
implementation. Firstly, a type-safe interface has been added to the
min_heap, along with the introduction of several new functions to
enhance its functionality. Additionally, the heap implementation for
bcache and bcachefs has been replaced with the generic min_heap
implementation from include/linux. Furthermore, several typos have been
corrected.

Previous discussion with Kent Overstreet:
https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu

Regards,
Kuan-Wei

---

You can preview this patch series on the 'refactor-heap-v2' branch of
the repository at the following link:

https://github.com/visitorckw/linux.git

Changes in v2:
- Add attribute __always_unused to the compare and swap functions
  that do not use the args parameter.
- Rename min_heapify() to min_heap_sift_down().
- Update lib/test_min_heap.c to use min_heap_init().
- Refine the commit message for bcache and bcachefs.
- Adjust the order of patches in the patch series.

Link to v1: https://lkml.kernel.org/20240319180005.246930-1-visitorckw@gmail.com

Kuan-Wei Chiu (15):
  perf/core: Fix several typos
  bcache: Fix typo
  bcachefs: Fix typo
  lib min_heap: Add type safe interface
  lib min_heap: Add min_heap_init()
  lib min_heap: Add min_heap_peek()
  lib min_heap: Add min_heap_full()
  lib min_heap: Add min_heap_del()
  lib min_heap: Add min_heap_sift_up()
  lib min_heap: Add args for min_heap_callbacks
  lib min_heap: Update min_heap_push() and min_heap_pop() to return bool
    values
  lib min_heap: Rename min_heapify() to min_heap_sift_down()
  lib/test_min_heap: Use min_heap_init() for initializing
  bcache: Remove heap-related macros and switch to generic min_heap
  bcachefs: Remove heap-related macros and switch to generic min_heap

 drivers/md/bcache/alloc.c      |  66 ++++++++----
 drivers/md/bcache/bcache.h     |   2 +-
 drivers/md/bcache/bset.c       |  73 ++++++++-----
 drivers/md/bcache/bset.h       |  38 ++++---
 drivers/md/bcache/btree.c      |  27 ++++-
 drivers/md/bcache/extents.c    |  44 ++++----
 drivers/md/bcache/movinggc.c   |  40 ++++++--
 drivers/md/bcache/super.c      |  16 +++
 drivers/md/bcache/sysfs.c      |   3 +
 drivers/md/bcache/util.c       |   2 +-
 drivers/md/bcache/util.h       |  81 +--------------
 drivers/md/dm-vdo/repair.c     |  29 +++---
 drivers/md/dm-vdo/slab-depot.c |  22 ++--
 fs/bcachefs/clock.c            |  53 +++++++---
 fs/bcachefs/clock_types.h      |   2 +-
 fs/bcachefs/ec.c               | 100 +++++++++++-------
 fs/bcachefs/ec_types.h         |   2 +-
 fs/bcachefs/util.c             |   2 +-
 fs/bcachefs/util.h             | 127 ++---------------------
 include/linux/min_heap.h       | 180 ++++++++++++++++++++++++++-------
 kernel/events/core.c           |  53 +++++-----
 lib/test_min_heap.c            |  70 ++++++-------
 22 files changed, 562 insertions(+), 470 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2024-03-23  2:19 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 14:54 [PATCH v2 00/15] treewide: Refactor heap related implementation Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 01/15] perf/core: Fix several typos Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 02/15] bcache: Fix typo Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 03/15] bcachefs: " Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 04/15] lib min_heap: Add type safe interface Kuan-Wei Chiu
2024-03-20 20:56   ` Kent Overstreet
2024-03-21 11:57     ` Kuan-Wei Chiu
2024-03-21 21:22       ` Kent Overstreet
2024-03-22 17:02         ` Kuan-Wei Chiu
2024-03-22 18:23           ` Kent Overstreet
2024-03-23  1:53             ` Kuan-Wei Chiu
2024-03-23  2:08               ` Kent Overstreet
2024-03-23  2:19                 ` Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 05/15] lib min_heap: Add min_heap_init() Kuan-Wei Chiu
2024-03-20 17:13   ` Ian Rogers
2024-03-20 17:17     ` Ian Rogers
2024-03-20 14:54 ` [PATCH v2 06/15] lib min_heap: Add min_heap_peek() Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 07/15] lib min_heap: Add min_heap_full() Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 08/15] lib min_heap: Add min_heap_del() Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 09/15] lib min_heap: Add min_heap_sift_up() Kuan-Wei Chiu
2024-03-20 17:15   ` Ian Rogers
2024-03-21  7:00     ` Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 10/15] lib min_heap: Add args for min_heap_callbacks Kuan-Wei Chiu
2024-03-20 17:15   ` Ian Rogers
2024-03-20 14:54 ` [PATCH v2 11/15] lib min_heap: Update min_heap_push() and min_heap_pop() to return bool values Kuan-Wei Chiu
2024-03-20 14:54 ` [PATCH v2 12/15] lib min_heap: Rename min_heapify() to min_heap_sift_down() Kuan-Wei Chiu
2024-03-20 17:17   ` Ian Rogers
2024-03-20 14:54 ` [PATCH v2 13/15] lib/test_min_heap: Use min_heap_init() for initializing Kuan-Wei Chiu
2024-03-20 17:16   ` Ian Rogers
2024-03-20 14:54 ` [PATCH v2 14/15] bcache: Remove heap-related macros and switch to generic min_heap Kuan-Wei Chiu
2024-03-20 17:19   ` Ian Rogers
2024-03-20 14:54 ` [PATCH v2 15/15] bcachefs: " Kuan-Wei Chiu
2024-03-20 17:20   ` Ian Rogers
2024-03-20 19:57 ` [PATCH v2 00/15] treewide: Refactor heap related implementation Kent Overstreet
2024-03-21  7:08   ` Kuan-Wei Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).