Skip to contentSkip to conversation

lib-min_heap-optimize-number-of-calls-to-min_heapify.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Feb 22, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib min_heap: optimize number of calls to min_heapify()
has been removed from the -mm tree. Its filename was
lib-min_heap-optimize-number-of-calls-to-min_heapify.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Kuan-Wei Chiu <[email protected]>
Subject: lib min_heap: optimize number of calls to min_heapify()
Date: Wed, 10 Jan 2024 16:12:12 +0800

Patch series "lib min_heap: Min heap optimizations".

The purpose of this patch series is to enhance the existing min heap implementation. The optimization focuses on both the heap construction process and the number of comparisons made during the heapify operation.

This patch (of 2):

Improve the heap construction process by reducing unnecessary heapify operations. Specifically, adjust the starting condition from n / 2 to n / 2 - 1 in the loop that iterates over all non-leaf elements.

---

 include/linux/min_heap.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/min_heap.h renamed from include/linux/min_heap.h~lib-min_heap-optimize-number-of-calls-to-min_heapify +1 -1
@@ -70,7 +70,7 @@ void min_heapify_all(struct min_heap *he
 {
 	int i;
 
-	for (i = heap->nr / 2; i >= 0; i--)
+	for (i = heap->nr / 2 - 1; i >= 0; i--)
 		min_heapify(heap, i, func);
 }
 

_

Patches currently in -mm which might be from [email protected] are