objagg_hints
struct objagg_hints *hints)
struct objagg_hints *hints, bool *p_rehash_needed)
struct objagg_hints *hints;
struct objagg_hints *hints = hints_priv;
struct objagg_hints *hints = hints_priv;
struct objagg_hints;
struct objagg_hints *hints, void *priv);
struct objagg_hints *objagg_hints_get(struct objagg *objagg,
void objagg_hints_put(struct objagg_hints *objagg_hints);
objagg_hints_stats_get(struct objagg_hints *objagg_hints);
objagg_hints_stats_get(struct objagg_hints *objagg_hints)
objagg_hints->node_count);
list_for_each_entry(hnode, &objagg_hints->node_list, list) {
objagg_hints_lookup(struct objagg_hints *objagg_hints, void *obj)
if (!objagg_hints)
return rhashtable_lookup_fast(&objagg_hints->node_ht, obj,
objagg_hints->ht_params);
struct objagg_hints *hints;
struct objagg_hints *objagg_hints, void *priv)
if (objagg_hints) {
objagg->hints = objagg_hints;
objagg_hints->refcount++;
objagg_hints_node_create(struct objagg_hints *objagg_hints,
hnode->root_id = objagg_hints->root_count++;
err = rhashtable_insert_fast(&objagg_hints->node_ht, &hnode->ht_node,
objagg_hints->ht_params);
list_add(&hnode->list, &objagg_hints->node_list);
objagg_hints->node_count++;
static void objagg_hints_flush(struct objagg_hints *objagg_hints)
list_for_each_entry_safe(hnode, tmp, &objagg_hints->node_list, list) {
rhashtable_remove_fast(&objagg_hints->node_ht, &hnode->ht_node,
objagg_hints->ht_params);
objagg_opt_simple_greedy_fillup_hints(struct objagg_hints *objagg_hints,
hnode = objagg_hints_node_create(objagg_hints,
hnode = objagg_hints_node_create(objagg_hints,
int (*fillup_hints)(struct objagg_hints *objagg_hints,
struct objagg_hints *objagg_hints_get(struct objagg *objagg,
struct objagg_hints *objagg_hints;
objagg_hints = kzalloc_obj(*objagg_hints);
if (!objagg_hints)
objagg_hints->ops = objagg->ops;
objagg_hints->refcount = 1;
INIT_LIST_HEAD(&objagg_hints->node_list);
objagg_hints->ht_params.key_len = objagg->ops->obj_size;
objagg_hints->ht_params.key_offset =
objagg_hints->ht_params.head_offset =
err = rhashtable_init(&objagg_hints->node_ht, &objagg_hints->ht_params);
err = algo->fillup_hints(objagg_hints, objagg);
if (WARN_ON(objagg_hints->node_count != objagg->obj_count)) {
return objagg_hints;
objagg_hints_flush(objagg_hints);
rhashtable_destroy(&objagg_hints->node_ht);
kfree(objagg_hints);
void objagg_hints_put(struct objagg_hints *objagg_hints)
if (--objagg_hints->refcount)
objagg_hints_flush(objagg_hints);
rhashtable_destroy(&objagg_hints->node_ht);
kfree(objagg_hints);
static void pr_debug_hints_stats(struct objagg_hints *objagg_hints)
stats = objagg_hints_stats_get(objagg_hints);
static int check_expect_hints_stats(struct objagg_hints *objagg_hints,
stats = objagg_hints_stats_get(objagg_hints);
struct objagg_hints *hints, struct objagg *objagg)
struct objagg_hints *hints;