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
689 * It's _really_ critical that we don't free too many btree nodes - we
904 * We can only have one thread cannibalizing other cached btree nodes at a time,
932 * the list. Check if there's any freed nodes there:
1231 * ptr_invalid() can't return true for the keys that mark btree nodes as
1310 gc->nodes++;
1359 unsigned int i, nodes = 0, keys = 0, blocks;
1373 while (nodes < GC_MERGE_NODES && !IS_ERR_OR_NULL(r[nodes].b))
1374 keys += r[nodes++].keys;
1378 if (nodes < 2 ||
1380 block_bytes(b->c->cache)) > blocks * (nodes - 1))
1383 for (i = 0; i < nodes; i++) {
1391 * nodes, to make sure the insert below will succeed - we also check
1398 for (i = 0; i < nodes; i++)
1401 for (i = nodes - 1; i > 0; --i) {
1467 for (i = 0; i < nodes; i++)
1478 for (i = 0; i < nodes; i++) {
1489 for (i = 0; i < nodes; i++) {
1496 memmove(r, r + 1, sizeof(r[0]) * (nodes - 1));
1497 r[nodes - 1].b = ERR_PTR(-EINTR);
1499 trace_bcache_btree_gc_coalesce(nodes);
1500 gc->nodes--;
1508 for (i = 0; i < nodes; i++)
1519 for (i = 0; i < nodes; i++)
1583 * side I/O comes, so when there are many btree nodes,
1584 * if GC only processes constant (100) nodes each time,
1588 * So GC should not process constant nodes, but varied
1589 * nodes according to the number of btree nodes, which
1591 * so when there are many btree nodes, GC can process
1592 * more nodes each time, otherwise, GC will process less
1593 * nodes each time (but no less than MIN_GC_NODES)
1595 min_nodes = c->gc_stats.nodes / MAX_GC_TIMES;
1655 * Must flush leaf nodes before gc ends, since replace
1669 gc->nodes >= gc->nodes_pre + btree_gc_min_nodes(b->c)) {
1670 gc->nodes_pre = gc->nodes;
1925 * initiallize c->gc_stats.nodes
1928 b->c->gc_stats.nodes++;
2000 c->gc_stats.nodes++;
2072 * Run multiple threads to check btree nodes in parallel,
2535 /* Map across nodes or keys */