Lines Matching refs:mtime
337 unsigned long long mtime = 0; in get_cb_cost() local
345 mtime += get_seg_entry(sbi, start + i)->mtime; in get_cb_cost()
348 mtime = div_u64(mtime, usable_segs_per_sec); in get_cb_cost()
354 if (mtime < sit_i->min_mtime) in get_cb_cost()
355 sit_i->min_mtime = mtime; in get_cb_cost()
356 if (mtime > sit_i->max_mtime) in get_cb_cost()
357 sit_i->max_mtime = mtime; in get_cb_cost()
359 age = 100 - div64_u64(100 * (mtime - sit_i->min_mtime), in get_cb_cost()
394 unsigned long long mtime, unsigned int segno, in attach_victim_entry() argument
404 ve->mtime = mtime; in attach_victim_entry()
418 unsigned long long mtime, unsigned int segno) in insert_victim_entry() argument
425 p = f2fs_lookup_rb_tree_ext(sbi, &am->root, &parent, mtime, &left_most); in insert_victim_entry()
426 attach_victim_entry(sbi, mtime, segno, parent, p, left_most); in insert_victim_entry()
435 unsigned long long mtime = 0; in add_victim_entry() local
445 mtime += get_seg_entry(sbi, start + i)->mtime; in add_victim_entry()
446 mtime = div_u64(mtime, sbi->segs_per_sec); in add_victim_entry()
449 if (mtime < sit_i->min_mtime) in add_victim_entry()
450 sit_i->min_mtime = mtime; in add_victim_entry()
451 if (mtime > sit_i->max_mtime) in add_victim_entry()
452 sit_i->max_mtime = mtime; in add_victim_entry()
453 if (mtime < sit_i->dirty_min_mtime) in add_victim_entry()
454 sit_i->dirty_min_mtime = mtime; in add_victim_entry()
455 if (mtime > sit_i->dirty_max_mtime) in add_victim_entry()
456 sit_i->dirty_max_mtime = mtime; in add_victim_entry()
459 if (sit_i->dirty_max_mtime - mtime < p->age_threshold) in add_victim_entry()
462 insert_victim_entry(sbi, mtime, segno); in add_victim_entry()
517 if (ve->mtime >= max_mtime || ve->mtime < min_mtime) in atgc_lookup_victim()
521 age = div64_u64(accu * (max_mtime - ve->mtime), total_time) * in atgc_lookup_victim()
588 if (ve->mtime >= max_mtime || ve->mtime < min_mtime) in atssr_lookup_victim()
591 age = max_mtime - ve->mtime; in atssr_lookup_victim()