cost 667 block/blk-iocost.c static u64 cost_to_abs_cost(u64 cost, u32 hw_inuse) cost 669 block/blk-iocost.c return DIV64_U64_ROUND_UP(cost * hw_inuse, HWEIGHT_WHOLE); cost 672 block/blk-iocost.c static void iocg_commit_bio(struct ioc_gq *iocg, struct bio *bio, u64 cost) cost 674 block/blk-iocost.c bio->bi_iocost_cost = cost; cost 675 block/blk-iocost.c atomic64_add(cost, &iocg->vtime); cost 1121 block/blk-iocost.c u64 cost = abs_cost_to_cost(wait->abs_cost, ctx->hw_inuse); cost 1123 block/blk-iocost.c ctx->vbudget -= cost; cost 1128 block/blk-iocost.c iocg_commit_bio(ctx->iocg, wait->bio, cost); cost 1212 block/blk-iocost.c static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now, u64 cost) cost 1242 block/blk-iocost.c if (cost) { cost 1243 block/blk-iocost.c u64 cost_ns = DIV64_U64_ROUND_UP(cost * NSEC_PER_USEC, cost 1642 block/blk-iocost.c u64 cost = 0; cost 1666 block/blk-iocost.c cost += coef_randio; cost 1668 block/blk-iocost.c cost += coef_seqio; cost 1671 block/blk-iocost.c cost += pages * coef_page; cost 1673 block/blk-iocost.c *costp = cost; cost 1678 block/blk-iocost.c u64 cost; cost 1680 block/blk-iocost.c calc_vtime_cost_builtin(bio, iocg, is_merge, &cost); cost 1681 block/blk-iocost.c return cost; cost 1692 block/blk-iocost.c u64 abs_cost, cost, vtime; cost 1722 block/blk-iocost.c cost = abs_cost_to_cost(abs_cost, hw_inuse); cost 1730 block/blk-iocost.c time_before_eq64(vtime + cost, now.vnow)) { cost 1731 block/blk-iocost.c iocg_commit_bio(iocg, bio, cost); cost 1745 block/blk-iocost.c iocg_commit_bio(iocg, bio, cost); cost 1768 block/blk-iocost.c if (iocg_kick_delay(iocg, &now, cost)) cost 1818 block/blk-iocost.c u64 abs_cost, cost; cost 1831 block/blk-iocost.c cost = abs_cost_to_cost(abs_cost, hw_inuse); cost 1843 block/blk-iocost.c time_before_eq64(atomic64_read(&iocg->vtime) + cost, now.vnow)) { cost 1844 block/blk-iocost.c iocg_commit_bio(iocg, bio, cost); cost 1856 block/blk-iocost.c iocg_kick_delay(iocg, &now, cost); cost 1858 block/blk-iocost.c iocg_commit_bio(iocg, bio, cost); cost 360 fs/f2fs/gc.c unsigned long cost; cost 407 fs/f2fs/gc.c cost = get_gc_cost(sbi, segno, &p); cost 409 fs/f2fs/gc.c if (p.min_cost > cost) { cost 411 fs/f2fs/gc.c p.min_cost = cost; cost 23 include/linux/energy_model.h unsigned long cost; cost 148 include/linux/energy_model.h return cs->cost * sum_util / scale_cpu; cost 750 include/trace/events/f2fs.h __field(unsigned int, cost) cost 764 include/trace/events/f2fs.h __entry->cost = p->min_cost; cost 780 include/trace/events/f2fs.h __entry->cost, cost 21 include/uapi/linux/netfilter/xt_limit.h __u32 credit_cap, cost; cost 22 include/uapi/linux/netfilter_bridge/ebt_limit.h __u32 credit_cap, cost; cost 77 kernel/bpf/arraymap.c u64 cost, array_size, mask64; cost 111 kernel/bpf/arraymap.c cost = array_size; cost 113 kernel/bpf/arraymap.c cost += (u64)attr->max_entries * elem_size * num_possible_cpus(); cost 115 kernel/bpf/arraymap.c ret = bpf_map_charge_init(&mem, cost); cost 85 kernel/bpf/cpumap.c u64 cost; cost 108 kernel/bpf/cpumap.c cost = (u64) cmap->map.max_entries * sizeof(struct bpf_cpu_map_entry *); cost 109 kernel/bpf/cpumap.c cost += sizeof(struct list_head) * num_possible_cpus(); cost 112 kernel/bpf/cpumap.c ret = bpf_map_charge_init(&cmap->map.memory, cost); cost 113 kernel/bpf/devmap.c u64 cost; cost 129 kernel/bpf/devmap.c cost = (u64) sizeof(struct list_head) * num_possible_cpus(); cost 136 kernel/bpf/devmap.c cost += (u64) sizeof(struct hlist_head) * dtab->n_buckets; cost 138 kernel/bpf/devmap.c cost += (u64) dtab->map.max_entries * sizeof(struct bpf_dtab_netdev *); cost 142 kernel/bpf/devmap.c err = bpf_map_charge_init(&dtab->map.memory, cost); cost 310 kernel/bpf/hashtab.c u64 cost; cost 346 kernel/bpf/hashtab.c cost = (u64) htab->n_buckets * sizeof(struct bucket) + cost 350 kernel/bpf/hashtab.c cost += (u64) round_up(htab->map.value_size, 8) * cost 353 kernel/bpf/hashtab.c cost += (u64) htab->elem_size * num_possible_cpus(); cost 356 kernel/bpf/hashtab.c err = bpf_map_charge_init(&htab->map.memory, cost); cost 543 kernel/bpf/lpm_trie.c u64 cost = sizeof(*trie), cost_per_node; cost 572 kernel/bpf/lpm_trie.c cost += (u64) attr->max_entries * cost_per_node; cost 574 kernel/bpf/lpm_trie.c ret = bpf_map_charge_init(&trie->map.memory, cost); cost 72 kernel/bpf/queue_stack_maps.c u64 size, queue_size, cost; cost 75 kernel/bpf/queue_stack_maps.c cost = queue_size = sizeof(*qs) + size * attr->value_size; cost 77 kernel/bpf/queue_stack_maps.c ret = bpf_map_charge_init(&mem, cost); cost 90 kernel/bpf/stackmap.c u64 cost, n_buckets; cost 116 kernel/bpf/stackmap.c cost = n_buckets * sizeof(struct stack_map_bucket *) + sizeof(*smap); cost 117 kernel/bpf/stackmap.c cost += n_buckets * (value_size + sizeof(struct stack_map_bucket)); cost 118 kernel/bpf/stackmap.c err = bpf_map_charge_init(&mem, cost); cost 122 kernel/bpf/stackmap.c smap = bpf_map_area_alloc(cost, bpf_map_attr_numa_node(attr)); cost 85 kernel/bpf/xskmap.c u64 cost; cost 102 kernel/bpf/xskmap.c cost = (u64)m->map.max_entries * sizeof(struct xdp_sock *); cost 103 kernel/bpf/xskmap.c cost += sizeof(struct list_head) * num_possible_cpus(); cost 106 kernel/bpf/xskmap.c err = bpf_map_charge_init(&m->map.memory, cost); cost 41 kernel/power/energy_model.c debugfs_create_ulong("cost", 0444, d, &cs->cost); cost 152 kernel/power/energy_model.c table[i].cost = div64_u64(fmax * table[i].power, cost 5963 kernel/sched/fair.c u64 time, cost; cost 6004 kernel/sched/fair.c cost = this_sd->avg_scan_cost; cost 6005 kernel/sched/fair.c delta = (s64)(time - cost) / 8; cost 46 net/bridge/netfilter/ebt_limit.c if (info->credit >= info->cost) { cost 48 net/bridge/netfilter/ebt_limit.c info->credit -= info->cost; cost 85 net/bridge/netfilter/ebt_limit.c info->cost = user2credits(info->avg); cost 98 net/bridge/netfilter/ebt_limit.c compat_uint_t credit, credit_cap, cost; cost 638 net/core/bpf_sk_storage.c u64 cost; cost 650 net/core/bpf_sk_storage.c cost = sizeof(*smap->buckets) * nbuckets + sizeof(*smap); cost 652 net/core/bpf_sk_storage.c ret = bpf_map_charge_init(&smap->map.memory, cost); cost 27 net/core/sock_map.c u64 cost; cost 46 net/core/sock_map.c cost = (u64) stab->map.max_entries * sizeof(struct sock *); cost 47 net/core/sock_map.c err = bpf_map_charge_init(&stab->map.memory, cost); cost 807 net/core/sock_map.c u64 cost; cost 834 net/core/sock_map.c cost = (u64) htab->buckets_num * sizeof(struct bpf_htab_bucket) + cost 836 net/core/sock_map.c if (cost >= U32_MAX - PAGE_SIZE) { cost 28 net/netfilter/nft_limit.c static inline bool nft_limit_eval(struct nft_limit *limit, u64 cost) cost 40 net/netfilter/nft_limit.c delta = tokens - cost; cost 126 net/netfilter/nft_limit.c u64 cost; cost 135 net/netfilter/nft_limit.c if (nft_limit_eval(&priv->limit, priv->cost)) cost 158 net/netfilter/nft_limit.c priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); cost 183 net/netfilter/nft_limit.c u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); cost 185 net/netfilter/nft_limit.c if (nft_limit_eval(priv, cost)) cost 245 net/netfilter/nft_limit.c if (nft_limit_eval(&priv->limit, priv->cost)) cost 260 net/netfilter/nft_limit.c priv->cost = div64_u64(priv->limit.nsecs, priv->limit.rate); cost 287 net/netfilter/nft_limit.c u64 cost = div64_u64(priv->nsecs * pkt->skb->len, priv->rate); cost 289 net/netfilter/nft_limit.c if (nft_limit_eval(priv, cost)) cost 103 net/netfilter/xt_hashlimit.c u_int64_t cost; cost 596 net/netfilter/xt_hashlimit.c dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); cost 601 net/netfilter/xt_hashlimit.c dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); cost 712 net/netfilter/xt_hashlimit.c tmp = tmp * dh->rateinfo.cost; cost 733 net/netfilter/xt_hashlimit.c u64 cost; cost 760 net/netfilter/xt_hashlimit.c cost = (cfg->mode & XT_HASHLIMIT_BYTES) ? skb->len : 1; cost 761 net/netfilter/xt_hashlimit.c dh->rateinfo.current_rate += cost; cost 774 net/netfilter/xt_hashlimit.c cost = hashlimit_byte_cost(skb->len, dh); cost 776 net/netfilter/xt_hashlimit.c cost = dh->rateinfo.cost; cost 778 net/netfilter/xt_hashlimit.c if (dh->rateinfo.credit >= cost) { cost 780 net/netfilter/xt_hashlimit.c dh->rateinfo.credit -= cost; cost 1106 net/netfilter/xt_hashlimit.c ent->rateinfo.cost); cost 1117 net/netfilter/xt_hashlimit.c ent->rateinfo.cost); cost 76 net/netfilter/xt_limit.c if (priv->credit >= r->cost) { cost 78 net/netfilter/xt_limit.c priv->credit -= r->cost; cost 121 net/netfilter/xt_limit.c if (r->cost == 0) { cost 123 net/netfilter/xt_limit.c r->cost = user2credits(r->avg); cost 144 net/netfilter/xt_limit.c u_int32_t credit_cap, cost; cost 160 net/netfilter/xt_limit.c .cost = cm->cost, cost 174 net/netfilter/xt_limit.c .cost = m->cost, cost 450 net/openvswitch/meter.c u32 cost; cost 486 net/openvswitch/meter.c cost = (meter->kbps) ? skb->len * 8 : 1000; cost 499 net/openvswitch/meter.c if (band->bucket >= cost) { cost 500 net/openvswitch/meter.c band->bucket -= cost; cost 794 tools/perf/util/hist.c u64 cost; cost 803 tools/perf/util/hist.c cost = sample->weight; cost 804 tools/perf/util/hist.c if (!cost) cost 805 tools/perf/util/hist.c cost = 1; cost 814 tools/perf/util/hist.c sample->period = cost; cost 700 tools/perf/util/stat-shadow.c double smi_num, aperf, cycles, cost = 0.0; cost 712 tools/perf/util/stat-shadow.c cost = (aperf - cycles) / aperf * 100.00; cost 714 tools/perf/util/stat-shadow.c if (cost > 10) cost 716 tools/perf/util/stat-shadow.c out->print_metric(config, out->ctx, color, "%8.1f%%", "SMI cycles%", cost);