/linux/fs/bcachefs/ |
H A D | movinggc.c | 151 move_buckets *buckets) in bch2_copygc_get_buckets() argument 188 ret2 = darray_push(buckets, b); in bch2_copygc_get_buckets() 194 ret2 = buckets->nr >= nr_to_get; in bch2_copygc_get_buckets() 201 saw, in_flight, not_movable, buckets->nr, sectors, nr_to_get, ret); in bch2_copygc_get_buckets() 216 move_buckets buckets = { 0 }; in bch2_copygc() local 221 ret = bch2_copygc_get_buckets(ctxt, buckets_in_flight, &buckets); in bch2_copygc() 225 darray_for_each(buckets, i) { in bch2_copygc() 248 darray_exit(&buckets); in bch2_copygc() 326 struct buckets_in_flight *buckets; in bch2_copygc_thread() local 330 buckets = kzalloc(sizeof(struct buckets_in_flight), GFP_KERNEL); in bch2_copygc_thread() [all …]
|
H A D | journal_sb.c | 38 b[i] = le64_to_cpu(journal->buckets[i]); in bch2_sb_journal_validate() 79 prt_printf(out, " %llu", le64_to_cpu(journal->buckets[i])); in bch2_sb_journal_to_text() 192 u64 *buckets, unsigned nr) in bch2_journal_buckets_to_sb() argument 207 if (buckets[i] + 1 != buckets[i + 1]) in bch2_journal_buckets_to_sb() 217 j->d[dst].start = cpu_to_le64(buckets[0]); in bch2_journal_buckets_to_sb() 221 if (buckets[i] == buckets[i - 1] + 1) { in bch2_journal_buckets_to_sb() 225 j->d[dst].start = cpu_to_le64(buckets[i]); in bch2_journal_buckets_to_sb()
|
/linux/drivers/s390/scsi/ |
H A D | zfcp_reqlist.h | 26 struct list_head buckets[ZFCP_REQ_LIST_BUCKETS]; member 52 INIT_LIST_HEAD(&rl->buckets[i]); in zfcp_reqlist_alloc() 68 if (!list_empty(&rl->buckets[i])) in zfcp_reqlist_isempty() 92 list_for_each_entry(req, &rl->buckets[i], list) in _zfcp_reqlist_find() 165 list_add_tail(&req->list, &rl->buckets[i]); in zfcp_reqlist_add() 182 list_splice_init(&rl->buckets[i], list); in zfcp_reqlist_move() 209 list_for_each_entry(req, &rl->buckets[i], list) in zfcp_reqlist_apply_for_all()
|
/linux/Documentation/networking/ |
H A D | nexthop-group-resilient.rst | 54 continuous. With a hash table, mapping between the hash table buckets and 56 the buckets that held it are simply reassigned to other next hops:: 70 choose a subset of buckets that are currently not used for forwarding 72 keeping the "busy" buckets intact. This way, established flows are ideally 80 certain number of buckets, according to its weight and the number of 81 buckets in the hash table. In accordance with the source code, we will call 86 Next hops that have fewer buckets than their wants count, are called 98 buckets: 105 underweight next hops. If, after considering all buckets in this manner, 109 There may not be enough "idle" buckets to satisfy the updated wants counts [all …]
|
/linux/tools/testing/selftests/bpf/ |
H A D | bpf_arena_htab.h | 14 htab_bucket_t *buckets; member 21 htab_bucket_t *b = htab->buckets; in __select_bucket() 95 void __arena *buckets = bpf_arena_alloc_pages(&arena, NULL, 2, NUMA_NO_NODE, 0); in htab_init() local 97 cast_user(buckets); in htab_init() 98 htab->buckets = buckets; in htab_init()
|
/linux/tools/perf/util/ |
H A D | hashmap.h | 77 struct hashmap_entry **buckets; member 170 for (cur = (map)->buckets[bkt]; cur; cur = cur->next) 182 for (cur = (map)->buckets[bkt]; \ 193 for (cur = (map)->buckets \ 194 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \ 201 for (cur = (map)->buckets \ 202 ? (map)->buckets[hash_bits((map)->hash_fn((_key), (map)->ctx), (map)->cap_bits)] \
|
H A D | hashmap.c | 45 map->buckets = NULL; in hashmap__init() 71 free(map->buckets); in hashmap__clear() 72 map->buckets = NULL; in hashmap__clear() 124 free(map->buckets); in hashmap_grow() 125 map->buckets = new_buckets; in hashmap_grow() 137 if (!map->buckets) in hashmap_find_entry() 140 for (prev_ptr = &map->buckets[hash], cur = *prev_ptr; in hashmap_find_entry() 200 hashmap_add_entry(&map->buckets[h], entry); in hashmap_insert()
|
H A D | ftrace.h | 46 int buckets[]); 71 int buckets[] __maybe_unused) in perf_ftrace__latency_read_bpf()
|
H A D | bpf_ftrace.c | 122 int buckets[]) in perf_ftrace__latency_read_bpf() argument 138 buckets[idx] = 0; in perf_ftrace__latency_read_bpf() 143 buckets[idx] += hist[i]; in perf_ftrace__latency_read_bpf()
|
/linux/tools/lib/bpf/ |
H A D | hashmap.c | 45 map->buckets = NULL; in hashmap__init() 71 free(map->buckets); in hashmap__clear() 72 map->buckets = NULL; in hashmap__clear() 124 free(map->buckets); in hashmap_grow() 125 map->buckets = new_buckets; in hashmap_grow() 137 if (!map->buckets) in hashmap_find_entry() 140 for (prev_ptr = &map->buckets[hash], cur = *prev_ptr; in hashmap_find_entry() 200 hashmap_add_entry(&map->buckets[h], entry); in hashmap_insert()
|
/linux/block/ |
H A D | blk-stat.c | 83 for (bucket = 0; bucket < cb->buckets; bucket++) in blk_stat_timer_fn() 90 for (bucket = 0; bucket < cb->buckets; bucket++) { in blk_stat_timer_fn() 102 unsigned int buckets, void *data) in blk_stat_alloc_callback() argument 110 cb->stat = kmalloc_array(buckets, sizeof(struct blk_rq_stat), in blk_stat_alloc_callback() 116 cb->cpu_stat = __alloc_percpu(buckets * sizeof(struct blk_rq_stat), in blk_stat_alloc_callback() 127 cb->buckets = buckets; in blk_stat_alloc_callback() 144 for (bucket = 0; bucket < cb->buckets; bucket++) in blk_stat_add_callback()
|
H A D | kyber-iosched.c | 134 atomic_t buckets[KYBER_OTHER][2][KYBER_LATENCY_BUCKETS]; member 214 unsigned int *buckets = kqd->latency_buckets[sched_domain][type]; in flush_latency_buckets() local 215 atomic_t *cpu_buckets = cpu_latency->buckets[sched_domain][type]; in flush_latency_buckets() 219 buckets[bucket] += atomic_xchg(&cpu_buckets[bucket], 0); in flush_latency_buckets() 230 unsigned int *buckets = kqd->latency_buckets[sched_domain][type]; in calculate_percentile() local 234 samples += buckets[bucket]; in calculate_percentile() 253 if (buckets[bucket] >= percentile_samples) in calculate_percentile() 255 percentile_samples -= buckets[bucket]; in calculate_percentile() 257 memset(buckets, 0, sizeof(kqd->latency_buckets[sched_domain][type])); in calculate_percentile() 636 atomic_inc(&cpu_latency->buckets[sched_domain][type][bucket]); in add_latency_sample()
|
/linux/drivers/md/dm-vdo/ |
H A D | priority-table.c | 44 struct bucket buckets[]; member 69 struct bucket *bucket = &table->buckets[priority]; in vdo_make_priority_table() 116 list_del_init(&table->buckets[priority].queue); in vdo_reset_priority_table() 134 list_move_tail(entry, &table->buckets[priority].queue); in vdo_priority_table_enqueue() 173 bucket = &table->buckets[top_priority]; in vdo_priority_table_dequeue()
|
/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | nexthop.sh | 213 $IP nexthop add id 10 group 1/2 type resilient buckets 4 229 $IP nexthop add id 10 group 1,3/2,2 type resilient buckets 5 259 $IP nexthop add id 10 group 1/2 type resilient buckets 4 &> /dev/null 325 $IP nexthop add id 10 group 1/2 type resilient buckets 6 353 $IP nexthop add id 10 group 1/2 type resilient buckets 6 408 $IP nexthop add id 10 group 1/2 type resilient buckets 8 idle_timer 4 434 type resilient buckets 8 idle_timer 6 469 $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 4 504 $IP nexthop add id 10 group 1/2 type resilient buckets 8 $timer 8 535 type resilient buckets 8 $timer 4 [all …]
|
/linux/lib/ |
H A D | hashtable_test.c | 189 int buckets[2]; in hashtable_test_hash_for_each_possible() local 223 buckets[y->key] = bkt; in hashtable_test_hash_for_each_possible() 230 if (buckets[0] == buckets[1]) { in hashtable_test_hash_for_each_possible() 244 int buckets[2]; in hashtable_test_hash_for_each_possible_safe() local 281 buckets[y->key] = bkt; in hashtable_test_hash_for_each_possible_safe() 288 if (buckets[0] == buckets[1]) { in hashtable_test_hash_for_each_possible_safe()
|
/linux/net/ceph/crush/ |
H A D | crush.c | 111 if (map->buckets) { in crush_destroy() 114 if (map->buckets[b] == NULL) in crush_destroy() 116 crush_destroy_bucket(map->buckets[b]); in crush_destroy() 118 kfree(map->buckets); in crush_destroy()
|
H A D | mapper.c | 531 itemtype = map->buckets[-1-item]->type; in crush_choose_firstn() 544 in = map->buckets[-1-item]; in crush_choose_firstn() 568 map->buckets[-1-item], in crush_choose_firstn() 744 itemtype = map->buckets[-1-item]->type; in crush_choose_indep() 761 in = map->buckets[-1-item]; in crush_choose_indep() 781 map->buckets[-1-item], in crush_choose_indep() 868 if (!map->buckets[b]) in crush_init_workspace() 872 switch (map->buckets[b]->alg) { in crush_init_workspace() 880 v += map->buckets[b]->size * sizeof(__u32); in crush_init_workspace() 951 map->buckets[-1-curstep->arg1])) { in crush_do_rule() [all …]
|
/linux/net/netfilter/ipvs/ |
H A D | ip_vs_sh.c | 70 struct ip_vs_sh_bucket buckets[IP_VS_SH_TAB_SIZE]; member 108 struct ip_vs_dest *dest = rcu_dereference(s->buckets[hash].dest); in ip_vs_sh_get() 130 dest = rcu_dereference(s->buckets[ihash].dest); in ip_vs_sh_get_fallback() 145 dest = rcu_dereference(s->buckets[hash].dest); in ip_vs_sh_get_fallback() 172 b = &s->buckets[0]; in ip_vs_sh_reassign() 216 b = &s->buckets[0]; in ip_vs_sh_flush()
|
H A D | ip_vs_dh.c | 64 struct ip_vs_dh_bucket buckets[IP_VS_DH_TAB_SIZE]; member 90 return rcu_dereference(s->buckets[ip_vs_dh_hashkey(af, addr)].dest); in ip_vs_dh_get() 106 b = &s->buckets[0]; in ip_vs_dh_reassign() 140 b = &s->buckets[0]; in ip_vs_dh_flush()
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | arena_htab.c | 20 printf("htab %p buckets %p n_buckets %d\n", htab, htab->buckets, htab->n_buckets); in test_arena_htab_common() 21 ASSERT_OK_PTR(htab->buckets, "htab->buckets shouldn't be NULL"); in test_arena_htab_common() 22 for (i = 0; htab->buckets && i < 16; i += 4) { in test_arena_htab_common()
|
/linux/tools/perf/ |
H A D | builtin-ftrace.c | 729 static void make_histogram(int buckets[], char *buf, size_t len, char *linebuf, in make_histogram() argument 786 buckets[i]++; in make_histogram() 797 static void display_histogram(int buckets[], bool use_nsec) in display_histogram() argument 806 total += buckets[i]; in display_histogram() 816 bar_len = buckets[0] * bar_total / total; in display_histogram() 818 0, 1, use_nsec ? "ns" : "us", buckets[0], bar_len, bar, bar_total - bar_len, ""); in display_histogram() 830 bar_len = buckets[i] * bar_total / total; in display_histogram() 832 start, stop, unit, buckets[i], bar_len, bar, in display_histogram() 836 bar_len = buckets[NUM_BUCKET - 1] * bar_total / total; in display_histogram() 838 1, "...", use_nsec ? "ms" : " s", buckets[NUM_BUCKET - 1], in display_histogram() [all …]
|
/linux/drivers/md/ |
H A D | dm-region-hash.c | 73 struct list_head *buckets; member 209 rh->buckets = vmalloc(array_size(nr_buckets, sizeof(*rh->buckets))); in dm_region_hash_create() 210 if (!rh->buckets) { in dm_region_hash_create() 217 INIT_LIST_HEAD(rh->buckets + i); in dm_region_hash_create() 231 vfree(rh->buckets); in dm_region_hash_create() 247 list_for_each_entry_safe(reg, nreg, rh->buckets + h, in dm_region_hash_destroy() 258 vfree(rh->buckets); in dm_region_hash_destroy() 277 struct list_head *bucket = rh->buckets + rh_hash(rh, region); in __rh_lookup() 288 list_add(®->hash_list, rh->buckets + rh_hash(rh, reg->key)); in __rh_insert()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ |
H A D | ipoib_vlan.c | 45 struct hlist_head buckets[1 << MLX5I_MAX_LOG_PKEY_SUP]; member 71 static struct qpn_to_netdev *mlx5i_find_qpn_to_netdev_node(struct hlist_head *buckets, in mlx5i_find_qpn_to_netdev_node() argument 74 struct hlist_head *h = &buckets[hash_32(qpn, MLX5I_MAX_LOG_PKEY_SUP)]; in mlx5i_find_qpn_to_netdev_node() 99 hlist_add_head(&new_node->hlist, &ht->buckets[key]); in mlx5i_pkey_add_qpn() 112 node = mlx5i_find_qpn_to_netdev_node(ht->buckets, qpn); in mlx5i_pkey_del_qpn() 131 node = mlx5i_find_qpn_to_netdev_node(ipriv->qpn_htbl->buckets, qpn); in mlx5i_pkey_get_netdev()
|
/linux/fs/nfs/ |
H A D | pnfs_nfs.c | 102 p = kmalloc(struct_size(p, buckets, n), gfp_flags); in pnfs_alloc_commit_array() 109 for (b = &p->buckets[0]; n != 0; b++, n--) { in pnfs_alloc_commit_array() 259 struct pnfs_commit_bucket *buckets, in pnfs_bucket_scan_array() argument 267 cnt = pnfs_bucket_scan_ds_commit_list(&buckets[i], cinfo, max); in pnfs_bucket_scan_array() 288 cnt = pnfs_bucket_scan_array(cinfo, array->buckets, in pnfs_generic_scan_commit_lists() 304 struct pnfs_commit_bucket *buckets, in pnfs_bucket_recover_commit_reqs() argument 314 for (i = 0, b = buckets; i < nbuckets; i++, b++) { in pnfs_bucket_recover_commit_reqs() 343 array->buckets, in pnfs_generic_recover_commit_reqs() 383 static void pnfs_generic_retry_commit(struct pnfs_commit_bucket *buckets, in pnfs_generic_retry_commit() argument 392 for (bucket = buckets; idx < nbuckets; bucket++, idx++) { in pnfs_generic_retry_commit() [all …]
|
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/ |
H A D | pno.c | 298 struct brcmf_gscan_bucket_config **buckets, in brcmf_pno_prep_fwconfig() argument 323 *buckets = NULL; in brcmf_pno_prep_fwconfig() 355 *buckets = fw_buckets; in brcmf_pno_prep_fwconfig() 396 struct brcmf_gscan_bucket_config *buckets; in brcmf_pno_config_sched_scans() local 403 n_buckets = brcmf_pno_prep_fwconfig(pi, &pno_cfg, &buckets, in brcmf_pno_config_sched_scans() 437 memcpy(gscan_cfg->bucket, buckets, in brcmf_pno_config_sched_scans() 438 array_size(n_buckets, sizeof(*buckets))); in brcmf_pno_config_sched_scans() 463 kfree(buckets); in brcmf_pno_config_sched_scans()
|