struct maple_enode *edst = mt_mk_node(dst, d_mt);
printk("dst %p d_slots %p %p\n", dst, d_slots, *d_slots);
- printk("d_start %u\n", d_start);
for (int i = 0; i < size; i++) {
+ printk("d_start %u + i = %u\n", d_start, d_start + i);
printk("set slot %u parent\n", i);
printk("d_slots = %p\n", d_slots[i]);
mas_set_parent(mas, d_slots[i], edst, d_start + i);
// printk("cp from %p -> %p %u\n", d_pivots, s_pivots, size);
fflush(stdout);
size--;
- if (size)
+ if (size) {
+ printk("memcpy pivots of size %u\n", size);
memcpy(d_pivots, s_pivots, size * sizeof(unsigned long));
+ }
return d_max;
}
gaps = ma_gaps(node, mt);
if (end < max_end - 1) {
size = max_end - end;
+
+ printk("Clear %u - %u\n", end, end + size - 1);
memset(ma_slots(node, mt) + end, 0, size * sizeof(void*));
if (gaps)
cp->split = (cp->data + 2) / 3;
cp->d_count = 3;
}
+ printk("split %u data %u d_count %u\n", cp->split, cp->data, cp->d_count);
for (int i = 0; i < cp->d_count; i++) {
cp->dst[i].mt = mt;
append_node_cp(cp, l_wr_mas->mas, 0, off);
cp->src[cp->s_count - 1].max = cp->min - 1;
- printk("Use pivot %p [%u]\n", l_wr_mas->node, off);
+ printk("->>src %u max is %lx\n", cp->s_count - 1,cp->min - 1);
}
printk("cp min is %lx\n", cp->min);
data_offset--;
dst_offset--;
cp->dst[d].max = ma_pivots(dst, d_mt)[dst_offset - 1];
+ printk("%d: RESET set dest max %lx\n", __LINE__, cp->dst[d].max);
}
+
node_finalise(dst, d_mt, dst_offset);
//mt_dump_node(mas->tree, mt_mk_node(dst, d_mt), 0, ULONG_MAX, 1, mt_dump_hex);
if (d >= cp->d_count) {
printk("\nlmas %p rmas %p\n", l_wr_mas->node, r_wr_mas->node);
cp.height++;
- printk("%d: cp min %lx\n", __LINE__, cp.min);
spanning_data_calc(&cp, mas, l_wr_mas, r_wr_mas, &sib);
- printk("%d: cp min %lx\n", __LINE__, cp.min);
spanning_split_dest_setup(&cp, mas, l_wr_mas->type);
- printk("%d: cp min %lx\n", __LINE__, cp.min);
spanning_split_src_setup(&cp, mas, l_wr_mas, r_wr_mas, &sib);
- printk("%d: cp min %lx\n", __LINE__, cp.min);
spanning_data_write(&cp, mas);
- printk("%d: cp min %lx\n", __LINE__, cp.min);
#if 0
if (debug < 2)
{
goto quit;
}
fflush(stdout);
- printk("start is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.index, mas.index, r_start, r_start);
+ printk("Error start is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.index, mas.index, r_start, r_start);
}
RCU_MT_BUG_ON(test, mas.index != r_start);
goto quit;
}
fflush(stdout);
- printk("last is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.last, mas.last, r_end, r_end);
+ printk("Error last is wrong: %lx (%lu) vs expected %lx (%lu)\n", mas.last, mas.last, r_end, r_end);
}
RCU_MT_BUG_ON(test, mas.last != r_end);
alt = xa_mk_value(index + i * 2 + 1 +
RCU_RANGE_COUNT);
mt_dump(test->mt, mt_dump_dec);
+ fflush(stdout);
printk("Error: %p %lu-%lu %p != %lu-%lu %p %p line %d i %d\n",
mas.node,
mas.index, mas.last, entry,
seed = 1 + r + rand() % 10;
}
+ mt_validate(mt);
+
+ printk("TREE START BEFORE TEST\n");
+ mt_dump(mt, mt_dump_hex);
+
i = count = ARRAY_SIZE(readers);
while (i--) {
unsigned long id;