Lines Matching refs:nodes
17 * Indexing is done via a btree; nodes are not necessarily fully sorted, rather
367 * flush, and writes appending to leaf nodes aren't blocking anything so
668 * It's _really_ critical that we don't free too many btree nodes - we
883 * We can only have one thread cannibalizing other cached btree nodes at a time,
911 * the list. Check if there's any freed nodes there:
1210 * ptr_invalid() can't return true for the keys that mark btree nodes as
1289 gc->nodes++;
1338 unsigned int i, nodes = 0, keys = 0, blocks;
1352 while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
1353 keys += r[nodes++].keys;
1357 if (nodes < 2 ||
1359 block_bytes(b->c->cache)) > blocks * (nodes - 1))
1362 for (i = 0; i < nodes; i++) {
1370 * nodes, to make sure the insert below will succeed - we also check
1377 for (i = 0; i < nodes; i++)
1380 for (i = nodes - 1; i > 0; --i) {
1446 for (i = 0; i < nodes; i++)
1457 for (i = 0; i < nodes; i++) {
1468 for (i = 0; i < nodes; i++) {
1475 memmove(r, r + 1, sizeof(r[0]) * (nodes - 1));
1476 r[nodes - 1].b = ERR_PTR(-EINTR);
1478 trace_bcache_btree_gc_coalesce(nodes);
1479 gc->nodes--;
1487 for (i = 0; i < nodes; i++)
1498 for (i = 0; i < nodes; i++)
1562 * side I/O comes, so when there are many btree nodes,
1563 * if GC only processes constant (100) nodes each time,
1567 * So GC should not process constant nodes, but varied
1568 * nodes according to the number of btree nodes, which
1570 * so when there are many btree nodes, GC can process
1571 * more nodes each time, otherwise, GC will process less
1572 * nodes each time (but no less than MIN_GC_NODES)
1574 min_nodes = c->gc_stats.nodes / MAX_GC_TIMES;
1634 * Must flush leaf nodes before gc ends, since replace
1648 gc->nodes >= gc->nodes_pre + btree_gc_min_nodes(b->c)) {
1649 gc->nodes_pre = gc->nodes;
1904 * initiallize c->gc_stats.nodes
1907 b->c->gc_stats.nodes++;
1979 c->gc_stats.nodes++;
2051 * Run multiple threads to check btree nodes in parallel,
2514 /* Map across nodes or keys */