[lttng-dev] [PATCH 1/6] change default mm type

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Sun Dec 4 11:52:41 EST 2011


Followed by:

commit 5a2141a73185fb1aaaceb73f8239a7efb81c16e6
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Sun Dec 4 11:51:09 2011 -0500

    rculfhash: Simplify default logic
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

diff --git a/rculfhash.c b/rculfhash.c
index 5ef2c78..d04451f 100644
--- a/rculfhash.c
+++ b/rculfhash.c
@@ -1275,14 +1275,8 @@ struct cds_lfht *_cds_lfht_new(unsigned long init_size,
 	 * Memory management plugin default.
 	 */
 	if (!mm) {
-		if (!max_nr_buckets) {
-			/*
-			 * If the maximum number of buckets is not
-			 * specified, we cannot use the mmap allocator,
-			 * so fallback on order allocator.
-			 */
-			mm = &cds_lfht_mm_order;
-		} else if (CAA_BITS_PER_LONG > 32
+		if (CAA_BITS_PER_LONG > 32
+				&& max_nr_buckets
 				&& max_nr_buckets <= (1ULL << 32)) {
 			/*
 			 * For 64-bit architectures, with max number of

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list