| /linux/tools/testing/selftests/damon/ |
| H A D | damos_quota_goal.py | 14 goal = _damon_sysfs.DamosQuotaGoal( 23 goals=[goal], reset_interval_ms=100), 39 goal.current_value = score_values_to_test.pop(0) 40 expect_increase = goal.current_value < goal.target_value 51 last_effective_bytes = goal.effective_bytes 61 goal.current_value, last_effective_bytes, goal.effective_bytes, 62 goal.effective_bytes / last_effective_bytes 65 if last_effective_bytes == goal.effective_bytes: 69 print('efective bytes not changed: %d' % goal.effective_bytes) 72 increased = last_effective_bytes < goal.effective_bytes [all …]
|
| H A D | drgn_dump_damon_status.py | 33 def intervals_goal_to_dict(goal): argument 34 return to_dict(goal, [ 94 def damos_quota_goal_to_dict(goal): argument 95 return to_dict(goal, [
|
| H A D | _damon_sysfs.py | 149 for idx, goal in enumerate(self.goals): 150 goal.idx = idx 151 goal.quota = self 190 for goal in self.goals: 191 err = goal.stage() 769 for goal in scheme.quota.goals: 775 goal.effective_bytes = int(content) 800 for goal in scheme.quota.goals: 801 err = goal.stage()
|
| /linux/mm/damon/ |
| H A D | reclaim.c | 196 struct damos_quota_goal *goal; in damon_reclaim_apply_parameters() local 229 goal = damos_new_quota_goal(DAMOS_QUOTA_SOME_MEM_PSI_US, in damon_reclaim_apply_parameters() 231 if (!goal) in damon_reclaim_apply_parameters() 233 damos_add_quota_goal(&scheme->quota, goal); in damon_reclaim_apply_parameters() 237 goal = damos_new_quota_goal(DAMOS_QUOTA_USER_INPUT, 10000); in damon_reclaim_apply_parameters() 238 if (!goal) in damon_reclaim_apply_parameters() 240 goal->current_value = quota_autotune_feedback; in damon_reclaim_apply_parameters() 241 damos_add_quota_goal(&scheme->quota, goal); in damon_reclaim_apply_parameters()
|
| H A D | core.c | 333 struct damos_quota_goal *goal; in damos_new_quota_goal() local 335 goal = kmalloc_obj(*goal); in damos_new_quota_goal() 336 if (!goal) in damos_new_quota_goal() 338 goal->metric = metric; in damos_new_quota_goal() 339 goal->target_value = target_value; in damos_new_quota_goal() 340 INIT_LIST_HEAD(&goal->list); in damos_new_quota_goal() 341 return goal; in damos_new_quota_goal() 692 struct damon_intervals_goal *goal = &attrs->intervals_goal; in damon_valid_intervals_goal() local 695 if (!goal->aggrs) in damon_valid_intervals_goal() 697 if (goal->min_sample_us > goal->max_sample_us) in damon_valid_intervals_goal() [all …]
|
| H A D | sysfs.c | 455 struct damon_sysfs_intervals_goal *goal = kmalloc_obj(*goal); in damon_sysfs_intervals_goal_alloc() local 457 if (!goal) in damon_sysfs_intervals_goal_alloc() 460 goal->kobj = (struct kobject){}; in damon_sysfs_intervals_goal_alloc() 461 goal->access_bp = access_bp; in damon_sysfs_intervals_goal_alloc() 462 goal->aggrs = aggrs; in damon_sysfs_intervals_goal_alloc() 463 goal->min_sample_us = min_sample_us; in damon_sysfs_intervals_goal_alloc() 464 goal->max_sample_us = max_sample_us; in damon_sysfs_intervals_goal_alloc() 465 return goal; in damon_sysfs_intervals_goal_alloc() 471 struct damon_sysfs_intervals_goal *goal = container_of(kobj, in access_bp_show() local 474 return sysfs_emit(buf, "%lu\n", goal->access_bp); in access_bp_show() [all …]
|
| H A D | sysfs-schemes.c | 1092 struct damos_sysfs_quota_goal *goal = container_of(kobj, in target_metric_show() local 1100 if (metric_name->metric == goal->metric) in target_metric_show() 1109 struct damos_sysfs_quota_goal *goal = container_of(kobj, in target_metric_store() local 1118 goal->metric = metric_name->metric; in target_metric_store() 1128 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in target_value_show() local 1131 return sysfs_emit(buf, "%lu\n", goal->target_value); in target_value_show() 1137 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in target_value_store() local 1139 int err = kstrtoul(buf, 0, &goal->target_value); in target_value_store() 1147 struct damos_sysfs_quota_goal *goal = container_of(kobj, struct in current_value_show() local 1150 return sysfs_emit(buf, "%lu\n", goal->current_value); in current_value_show() [all …]
|
| /linux/fs/affs/ |
| H A D | bitmap.c | 115 affs_alloc_block(struct inode *inode, u32 goal) in affs_alloc_block() argument 128 pr_debug("balloc(inode=%lu,goal=%u): ", inode->i_ino, goal); in affs_alloc_block() 136 if (!goal || goal > sbi->s_partition_size) { in affs_alloc_block() 137 if (goal) in affs_alloc_block() 138 affs_warning(sb, "affs_balloc", "invalid goal %d", goal); in affs_alloc_block() 141 goal = sbi->s_reserved; in affs_alloc_block() 144 blk = goal - sbi->s_reserved; in affs_alloc_block()
|
| /linux/fs/hfs/ |
| H A D | bitmap.c | 139 u32 hfs_vbm_search_free(struct super_block *sb, u32 goal, u32 *num_bits) in hfs_vbm_search_free() argument 151 pos = hfs_find_set_zero_bits(bitmap, HFS_SB(sb)->fs_ablocks, goal, num_bits); in hfs_vbm_search_free() 153 if (goal) in hfs_vbm_search_free() 154 pos = hfs_find_set_zero_bits(bitmap, goal, 0, num_bits); in hfs_vbm_search_free()
|
| H A D | extent.c | 394 u32 start, len, goal; in hfs_extend_file() local 399 goal = hfs_ext_lastblock(HFS_I(inode)->first_extents); in hfs_extend_file() 404 goal = hfs_ext_lastblock(HFS_I(inode)->cached_extents); in hfs_extend_file() 408 start = hfs_vbm_search_free(sb, goal, &len); in hfs_extend_file()
|
| /linux/drivers/scsi/aic7xxx/ |
| H A D | aic79xx_osm.c | 1691 if (tinfo->curr.period != tinfo->goal.period in ahd_send_async() 1692 || tinfo->curr.width != tinfo->goal.width in ahd_send_async() 1693 || tinfo->curr.offset != tinfo->goal.offset in ahd_send_async() 1694 || tinfo->curr.ppr_options != tinfo->goal.ppr_options) in ahd_send_async() 2391 unsigned int ppr_options = tinfo->goal.ppr_options; in ahd_linux_set_period() 2394 unsigned long offset = tinfo->goal.offset; in ahd_linux_set_period() 2457 period = tinfo->goal.period; in ahd_linux_set_offset() 2458 ppr_options = tinfo->goal.ppr_options; in ahd_linux_set_offset() 2479 unsigned int ppr_options = tinfo->goal.ppr_options in ahd_linux_set_dt() 2481 unsigned int period = tinfo->goal.period; in ahd_linux_set_dt() [all …]
|
| H A D | aic7xxx_osm.c | 1618 if (tinfo->curr.period != tinfo->goal.period in ahc_send_async() 1619 || tinfo->curr.width != tinfo->goal.width in ahc_send_async() 1620 || tinfo->curr.offset != tinfo->goal.offset in ahc_send_async() 1621 || tinfo->curr.ppr_options != tinfo->goal.ppr_options) in ahc_send_async() 2348 unsigned int ppr_options = tinfo->goal.ppr_options; in ahc_linux_set_period() 2350 unsigned long offset = tinfo->goal.offset; in ahc_linux_set_period() 2403 period = tinfo->goal.period; in ahc_linux_set_offset() 2404 ppr_options = tinfo->goal.ppr_options; in ahc_linux_set_offset() 2422 unsigned int ppr_options = tinfo->goal.ppr_options in ahc_linux_set_dt() 2424 unsigned int period = tinfo->goal.period; in ahc_linux_set_dt() [all …]
|
| H A D | aic7xxx_core.c | 1862 tinfo->goal.transport_version = 2; in ahc_handle_scsiint() 1863 tinfo->goal.ppr_options = 0; in ahc_handle_scsiint() 2148 memset(&tstate->transinfo[i].goal, 0, in ahc_alloc_tstate() 2149 sizeof(tstate->transinfo[i].goal)); in ahc_alloc_tstate() 2225 transinfo = &tinfo->goal; in ahc_devlimited_syncrate() 2386 *offset = min(*offset, (u_int)tinfo->goal.offset); in ahc_validate_offset() 2414 *bus_width = min((u_int)tinfo->goal.width, *bus_width); in ahc_validate_width() 2444 if (tinfo->curr.period != tinfo->goal.period in ahc_update_neg_request() 2445 || tinfo->curr.width != tinfo->goal.width in ahc_update_neg_request() 2446 || tinfo->curr.offset != tinfo->goal.offset in ahc_update_neg_request() [all …]
|
| /linux/drivers/scsi/sym53c8xx_2/ |
| H A D | sym_hipd.c | 1352 struct sym_trans *goal) argument 1355 goal->width = 0; 1358 goal->iu = 0; 1359 goal->dt = 0; 1360 goal->qas = 0; 1361 goal->offset = 0; 1367 goal->dt = 1; 1369 if (goal->offset == 0) 1370 goal->dt = 0; 1372 goal->dt = 0; [all …]
|
| /linux/net/netfilter/ipvs/ |
| H A D | ip_vs_lblc.c | 298 int goal; in ip_vs_lblc_check_expire() local 315 goal = (atomic_read(&tbl->entries) - tbl->max_size)*4/3; in ip_vs_lblc_check_expire() 316 if (goal > tbl->max_size/2) in ip_vs_lblc_check_expire() 317 goal = tbl->max_size/2; in ip_vs_lblc_check_expire() 329 goal--; in ip_vs_lblc_check_expire() 332 if (goal <= 0) in ip_vs_lblc_check_expire()
|
| H A D | ip_vs_lblcr.c | 462 int goal; in ip_vs_lblcr_check_expire() local 479 goal = (atomic_read(&tbl->entries) - tbl->max_size)*4/3; in ip_vs_lblcr_check_expire() 480 if (goal > tbl->max_size/2) in ip_vs_lblcr_check_expire() 481 goal = tbl->max_size/2; in ip_vs_lblcr_check_expire() 493 goal--; in ip_vs_lblcr_check_expire() 496 if (goal <= 0) in ip_vs_lblcr_check_expire()
|
| /linux/fs/ext2/ |
| H A D | balloc.c | 297 search_reserve_window(struct rb_root *root, ext2_fsblk_t goal) in search_reserve_window() argument 308 if (goal < rsv->rsv_start) in search_reserve_window() 310 else if (goal > rsv->rsv_end) in search_reserve_window() 321 if (rsv->rsv_start > goal) { in search_reserve_window() 1208 ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, in ext2_new_blocks() argument 1246 ext2_debug("goal=%lu.\n", goal); in ext2_new_blocks() 1270 if (goal < le32_to_cpu(es->s_first_data_block) || in ext2_new_blocks() 1271 goal >= le32_to_cpu(es->s_blocks_count)) in ext2_new_blocks() 1272 goal = le32_to_cpu(es->s_first_data_block); in ext2_new_blocks() 1273 group_no = (goal - le32_to_cpu(es->s_first_data_block)) / in ext2_new_blocks() [all …]
|
| H A D | inode.c | 400 ext2_fsblk_t goal, int indirect_blks, int blks, in ext2_alloc_blocks() argument 422 current_block = ext2_new_blocks(inode, goal, &count, err, 0); in ext2_alloc_blocks() 480 int indirect_blks, int *blks, ext2_fsblk_t goal, in ext2_alloc_branch() argument 491 num = ext2_alloc_blocks(inode, goal, indirect_blks, in ext2_alloc_branch() 633 ext2_fsblk_t goal; in ext2_get_blocks() local 721 goal = ext2_find_goal(inode, iblock, partial); in ext2_get_blocks() 734 err = ext2_alloc_branch(inode, indirect_blks, &count, goal, in ext2_get_blocks()
|
| /linux/fs/gfs2/ |
| H A D | rgrp.c | 235 u32 goal, u8 state) in gfs2_bitfit() argument 237 u32 spoint = (goal << 1) & ((8*sizeof(u64)) - 1); in gfs2_bitfit() 238 const __le64 *ptr = ((__le64 *)buf) + (goal >> 5); in gfs2_bitfit() 1152 u32 i, goal, count = 0; in count_unlinked() local 1155 goal = 0; in count_unlinked() 1158 while (goal < bi->bi_blocks) { in count_unlinked() 1159 goal = gfs2_bitfit(buffer, bi->bi_bytes, goal, in count_unlinked() 1161 if (goal == BFITNOENT) in count_unlinked() 1164 goal++; in count_unlinked() 1566 u64 goal; in rg_mblk_search() local [all …]
|
| /linux/fs/hfsplus/ |
| H A D | extents.c | 441 u32 start, len, goal; in hfsplus_file_extend() local 455 goal = hfsplus_ext_lastblock(hip->first_extents); in hfsplus_file_extend() 460 goal = hfsplus_ext_lastblock(hip->cached_extents); in hfsplus_file_extend() 464 start = hfsplus_block_allocate(sb, sbi->total_blocks, goal, &len); in hfsplus_file_extend() 466 start = hfsplus_block_allocate(sb, goal, 0, &len); in hfsplus_file_extend() 467 if (start >= goal) { in hfsplus_file_extend()
|
| /linux/fs/ext4/ |
| H A D | indirect.c | 254 ext4_fsblk_t goal; in ext4_find_goal() local 260 goal = ext4_find_near(inode, partial); in ext4_find_goal() 261 goal = goal & EXT4_MAX_BLOCK_FILE_PHYS; in ext4_find_goal() 262 return goal; in ext4_find_goal() 342 ar->goal = new_blocks[i] = ext4_new_meta_blocks(handle, in ext4_alloc_branch() 343 ar->inode, ar->goal, in ext4_alloc_branch() 620 ar.goal = ext4_find_goal(inode, map->m_lblk, partial); in ext4_ind_map_blocks()
|
| H A D | mballoc-test.c | 415 ar.goal = ext4_group_first_block_no(sb, goal_group); in test_new_blocks_simple() 417 KUNIT_ASSERT_EQ_MSG(test, ar.goal, found, in test_new_blocks_simple() 419 ar.goal, found); in test_new_blocks_simple() 422 ar.goal = ext4_group_first_block_no(sb, goal_group); in test_new_blocks_simple() 424 KUNIT_ASSERT_EQ_MSG(test, ar.goal + EXT4_C2B(sbi, 1), found, in test_new_blocks_simple() 426 ar.goal + 1, found); in test_new_blocks_simple() 430 ar.goal = ext4_group_first_block_no(sb, goal_group); in test_new_blocks_simple() 440 ar.goal = ext4_group_first_block_no(sb, goal_group); in test_new_blocks_simple() 450 ar.goal = ext4_group_first_block_no(sb, goal_group); in test_new_blocks_simple()
|
| /linux/fs/ufs/ |
| H A D | inode.c | 262 u64 tmp, goal, lastfrag; in ufs_inode_getfrag() local 277 goal = 0; in ufs_inode_getfrag() 279 goal = ufs_data_ptr_to_cpu(sb, in ufs_inode_getfrag() 281 if (goal) in ufs_inode_getfrag() 282 goal += uspi->s_fpb; in ufs_inode_getfrag() 285 goal, nfrags, err, locked_folio); in ufs_inode_getfrag() 320 u64 tmp = 0, goal; in ufs_inode_getblock() local 346 goal = tmp + uspi->s_fpb; in ufs_inode_getblock() 348 goal = bh->b_blocknr + uspi->s_fpb; in ufs_inode_getblock() 349 tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal, in ufs_inode_getblock()
|
| /linux/mm/damon/tests/ |
| H A D | core-kunit.h | 615 struct damos_quota_goal *goal, *next; in damos_test_commit_quota_goals_for() local 628 goal = damos_new_quota_goal(dst_goals[i].metric, in damos_test_commit_quota_goals_for() 630 if (!goal) in damos_test_commit_quota_goals_for() 632 damos_add_quota_goal(&dst, goal); in damos_test_commit_quota_goals_for() 641 damos_for_each_quota_goal(goal, (&dst)) { in damos_test_commit_quota_goals_for() 642 KUNIT_EXPECT_EQ(test, goal->metric, src_goals[i].metric); in damos_test_commit_quota_goals_for() 643 KUNIT_EXPECT_EQ(test, goal->target_value, in damos_test_commit_quota_goals_for() 649 damos_for_each_quota_goal_safe(goal, next, (&dst)) in damos_test_commit_quota_goals_for() 650 damos_destroy_quota_goal(goal); in damos_test_commit_quota_goals_for()
|
| /linux/net/dccp/ |
| H A D | proto.c | |