Lines Matching refs:hnode
223 struct objagg_hints_node *hnode) in objagg_obj_root_id_alloc() argument
234 if (hnode) { in objagg_obj_root_id_alloc()
235 min = hnode->root_id; in objagg_obj_root_id_alloc()
236 max = hnode->root_id; in objagg_obj_root_id_alloc()
263 struct objagg_hints_node *hnode) in objagg_obj_root_create() argument
267 err = objagg_obj_root_id_alloc(objagg, objagg_obj, hnode); in objagg_obj_root_create()
299 struct objagg_hints_node *hnode; in objagg_obj_init_with_hints() local
303 hnode = objagg_hints_lookup(objagg->hints, objagg_obj->obj); in objagg_obj_init_with_hints()
304 if (!hnode) { in objagg_obj_init_with_hints()
310 if (!hnode->parent) in objagg_obj_init_with_hints()
311 return objagg_obj_root_create(objagg, objagg_obj, hnode); in objagg_obj_init_with_hints()
313 parent = __objagg_obj_get(objagg, hnode->parent->obj); in objagg_obj_init_with_hints()
654 struct objagg_hints_node *hnode; in objagg_hints_node_create() local
657 hnode = kzalloc(sizeof(*hnode) + obj_size, GFP_KERNEL); in objagg_hints_node_create()
658 if (!hnode) in objagg_hints_node_create()
660 memcpy(hnode->obj, &objagg_obj->obj, obj_size); in objagg_hints_node_create()
661 hnode->stats_info.stats.user_count = user_count; in objagg_hints_node_create()
662 hnode->stats_info.stats.delta_user_count = user_count; in objagg_hints_node_create()
666 hnode->root_id = objagg_hints->root_count++; in objagg_hints_node_create()
667 hnode->stats_info.is_root = true; in objagg_hints_node_create()
669 hnode->stats_info.objagg_obj = objagg_obj; in objagg_hints_node_create()
671 err = rhashtable_insert_fast(&objagg_hints->node_ht, &hnode->ht_node, in objagg_hints_node_create()
676 list_add(&hnode->list, &objagg_hints->node_list); in objagg_hints_node_create()
677 hnode->parent = parent_hnode; in objagg_hints_node_create()
680 return hnode; in objagg_hints_node_create()
683 kfree(hnode); in objagg_hints_node_create()
689 struct objagg_hints_node *hnode, *tmp; in objagg_hints_flush() local
691 list_for_each_entry_safe(hnode, tmp, &objagg_hints->node_list, list) { in objagg_hints_flush()
692 list_del(&hnode->list); in objagg_hints_flush()
693 rhashtable_remove_fast(&objagg_hints->node_ht, &hnode->ht_node, in objagg_hints_flush()
695 kfree(hnode); in objagg_hints_flush()
842 struct objagg_hints_node *hnode, *parent_hnode; in objagg_opt_simple_greedy_fillup_hints() local
859 hnode = objagg_hints_node_create(objagg_hints, in objagg_opt_simple_greedy_fillup_hints()
863 if (IS_ERR(hnode)) { in objagg_opt_simple_greedy_fillup_hints()
864 err = PTR_ERR(hnode); in objagg_opt_simple_greedy_fillup_hints()
867 parent_hnode = hnode; in objagg_opt_simple_greedy_fillup_hints()
875 hnode = objagg_hints_node_create(objagg_hints, in objagg_opt_simple_greedy_fillup_hints()
879 if (IS_ERR(hnode)) { in objagg_opt_simple_greedy_fillup_hints()
880 err = PTR_ERR(hnode); in objagg_opt_simple_greedy_fillup_hints()
1022 struct objagg_hints_node *hnode; in objagg_hints_stats_get() local
1032 list_for_each_entry(hnode, &objagg_hints->node_list, list) { in objagg_hints_stats_get()
1033 memcpy(&objagg_stats->stats_info[i], &hnode->stats_info, in objagg_hints_stats_get()