Lines Matching refs:kobj

17 	struct kobject kobj;  member
32 sysfs_region->kobj = (struct kobject){}; in damon_sysfs_scheme_region_alloc()
40 static ssize_t start_show(struct kobject *kobj, struct kobj_attribute *attr, in start_show() argument
43 struct damon_sysfs_scheme_region *region = container_of(kobj, in start_show()
44 struct damon_sysfs_scheme_region, kobj); in start_show()
49 static ssize_t end_show(struct kobject *kobj, struct kobj_attribute *attr, in end_show() argument
52 struct damon_sysfs_scheme_region *region = container_of(kobj, in end_show()
53 struct damon_sysfs_scheme_region, kobj); in end_show()
58 static ssize_t nr_accesses_show(struct kobject *kobj, in nr_accesses_show() argument
61 struct damon_sysfs_scheme_region *region = container_of(kobj, in nr_accesses_show()
62 struct damon_sysfs_scheme_region, kobj); in nr_accesses_show()
67 static ssize_t age_show(struct kobject *kobj, struct kobj_attribute *attr, in age_show() argument
70 struct damon_sysfs_scheme_region *region = container_of(kobj, in age_show()
71 struct damon_sysfs_scheme_region, kobj); in age_show()
76 static void damon_sysfs_scheme_region_release(struct kobject *kobj) in damon_sysfs_scheme_region_release() argument
78 struct damon_sysfs_scheme_region *region = container_of(kobj, in damon_sysfs_scheme_region_release()
79 struct damon_sysfs_scheme_region, kobj); in damon_sysfs_scheme_region_release()
117 struct kobject kobj; member
129 regions->kobj = (struct kobject){}; in damon_sysfs_scheme_regions_alloc()
136 static ssize_t total_bytes_show(struct kobject *kobj, in total_bytes_show() argument
139 struct damon_sysfs_scheme_regions *regions = container_of(kobj, in total_bytes_show()
140 struct damon_sysfs_scheme_regions, kobj); in total_bytes_show()
152 kobject_put(&r->kobj); in damon_sysfs_scheme_regions_rm_dirs()
157 static void damon_sysfs_scheme_regions_release(struct kobject *kobj) in damon_sysfs_scheme_regions_release() argument
159 kfree(container_of(kobj, struct damon_sysfs_scheme_regions, kobj)); in damon_sysfs_scheme_regions_release()
182 struct kobject kobj; member
195 static ssize_t nr_tried_show(struct kobject *kobj, struct kobj_attribute *attr, in nr_tried_show() argument
198 struct damon_sysfs_stats *stats = container_of(kobj, in nr_tried_show()
199 struct damon_sysfs_stats, kobj); in nr_tried_show()
204 static ssize_t sz_tried_show(struct kobject *kobj, struct kobj_attribute *attr, in sz_tried_show() argument
207 struct damon_sysfs_stats *stats = container_of(kobj, in sz_tried_show()
208 struct damon_sysfs_stats, kobj); in sz_tried_show()
213 static ssize_t nr_applied_show(struct kobject *kobj, in nr_applied_show() argument
216 struct damon_sysfs_stats *stats = container_of(kobj, in nr_applied_show()
217 struct damon_sysfs_stats, kobj); in nr_applied_show()
222 static ssize_t sz_applied_show(struct kobject *kobj, in sz_applied_show() argument
225 struct damon_sysfs_stats *stats = container_of(kobj, in sz_applied_show()
226 struct damon_sysfs_stats, kobj); in sz_applied_show()
231 static ssize_t qt_exceeds_show(struct kobject *kobj, in qt_exceeds_show() argument
234 struct damon_sysfs_stats *stats = container_of(kobj, in qt_exceeds_show()
235 struct damon_sysfs_stats, kobj); in qt_exceeds_show()
240 static void damon_sysfs_stats_release(struct kobject *kobj) in damon_sysfs_stats_release() argument
242 kfree(container_of(kobj, struct damon_sysfs_stats, kobj)); in damon_sysfs_stats_release()
281 struct kobject kobj; member
302 static ssize_t type_show(struct kobject *kobj, in type_show() argument
305 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in type_show()
306 struct damon_sysfs_scheme_filter, kobj); in type_show()
312 static ssize_t type_store(struct kobject *kobj, in type_store() argument
315 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in type_store()
316 struct damon_sysfs_scheme_filter, kobj); in type_store()
331 static ssize_t matching_show(struct kobject *kobj, in matching_show() argument
334 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in matching_show()
335 struct damon_sysfs_scheme_filter, kobj); in matching_show()
340 static ssize_t matching_store(struct kobject *kobj, in matching_store() argument
343 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in matching_store()
344 struct damon_sysfs_scheme_filter, kobj); in matching_store()
355 static ssize_t memcg_path_show(struct kobject *kobj, in memcg_path_show() argument
358 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in memcg_path_show()
359 struct damon_sysfs_scheme_filter, kobj); in memcg_path_show()
365 static ssize_t memcg_path_store(struct kobject *kobj, in memcg_path_store() argument
368 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in memcg_path_store()
369 struct damon_sysfs_scheme_filter, kobj); in memcg_path_store()
380 static ssize_t addr_start_show(struct kobject *kobj, in addr_start_show() argument
383 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_start_show()
384 struct damon_sysfs_scheme_filter, kobj); in addr_start_show()
389 static ssize_t addr_start_store(struct kobject *kobj, in addr_start_store() argument
392 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_start_store()
393 struct damon_sysfs_scheme_filter, kobj); in addr_start_store()
399 static ssize_t addr_end_show(struct kobject *kobj, in addr_end_show() argument
402 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_end_show()
403 struct damon_sysfs_scheme_filter, kobj); in addr_end_show()
408 static ssize_t addr_end_store(struct kobject *kobj, in addr_end_store() argument
411 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_end_store()
412 struct damon_sysfs_scheme_filter, kobj); in addr_end_store()
418 static ssize_t damon_target_idx_show(struct kobject *kobj, in damon_target_idx_show() argument
421 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_target_idx_show()
422 struct damon_sysfs_scheme_filter, kobj); in damon_target_idx_show()
427 static ssize_t damon_target_idx_store(struct kobject *kobj, in damon_target_idx_store() argument
430 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_target_idx_store()
431 struct damon_sysfs_scheme_filter, kobj); in damon_target_idx_store()
437 static void damon_sysfs_scheme_filter_release(struct kobject *kobj) in damon_sysfs_scheme_filter_release() argument
439 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_sysfs_scheme_filter_release()
440 struct damon_sysfs_scheme_filter, kobj); in damon_sysfs_scheme_filter_release()
486 struct kobject kobj; member
504 kobject_put(&filters_arr[i]->kobj); in damon_sysfs_scheme_filters_rm_dirs()
533 err = kobject_init_and_add(&filter->kobj, in damon_sysfs_scheme_filters_add_dirs()
535 &filters->kobj, "%d", i); in damon_sysfs_scheme_filters_add_dirs()
537 kobject_put(&filter->kobj); in damon_sysfs_scheme_filters_add_dirs()
548 static ssize_t nr_filters_show(struct kobject *kobj, in nr_filters_show() argument
551 struct damon_sysfs_scheme_filters *filters = container_of(kobj, in nr_filters_show()
552 struct damon_sysfs_scheme_filters, kobj); in nr_filters_show()
557 static ssize_t nr_filters_store(struct kobject *kobj, in nr_filters_store() argument
568 filters = container_of(kobj, struct damon_sysfs_scheme_filters, kobj); in nr_filters_store()
580 static void damon_sysfs_scheme_filters_release(struct kobject *kobj) in damon_sysfs_scheme_filters_release() argument
582 kfree(container_of(kobj, struct damon_sysfs_scheme_filters, kobj)); in damon_sysfs_scheme_filters_release()
605 struct kobject kobj; member
622 watermarks->kobj = (struct kobject){}; in damon_sysfs_watermarks_alloc()
637 static ssize_t metric_show(struct kobject *kobj, struct kobj_attribute *attr, in metric_show() argument
640 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in metric_show()
641 struct damon_sysfs_watermarks, kobj); in metric_show()
647 static ssize_t metric_store(struct kobject *kobj, struct kobj_attribute *attr, in metric_store() argument
650 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in metric_store()
651 struct damon_sysfs_watermarks, kobj); in metric_store()
663 static ssize_t interval_us_show(struct kobject *kobj, in interval_us_show() argument
666 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in interval_us_show()
667 struct damon_sysfs_watermarks, kobj); in interval_us_show()
672 static ssize_t interval_us_store(struct kobject *kobj, in interval_us_store() argument
675 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in interval_us_store()
676 struct damon_sysfs_watermarks, kobj); in interval_us_store()
682 static ssize_t high_show(struct kobject *kobj, in high_show() argument
685 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in high_show()
686 struct damon_sysfs_watermarks, kobj); in high_show()
691 static ssize_t high_store(struct kobject *kobj, in high_store() argument
694 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in high_store()
695 struct damon_sysfs_watermarks, kobj); in high_store()
701 static ssize_t mid_show(struct kobject *kobj, in mid_show() argument
704 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in mid_show()
705 struct damon_sysfs_watermarks, kobj); in mid_show()
710 static ssize_t mid_store(struct kobject *kobj, in mid_store() argument
713 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in mid_store()
714 struct damon_sysfs_watermarks, kobj); in mid_store()
720 static ssize_t low_show(struct kobject *kobj, in low_show() argument
723 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in low_show()
724 struct damon_sysfs_watermarks, kobj); in low_show()
729 static ssize_t low_store(struct kobject *kobj, in low_store() argument
732 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in low_store()
733 struct damon_sysfs_watermarks, kobj); in low_store()
739 static void damon_sysfs_watermarks_release(struct kobject *kobj) in damon_sysfs_watermarks_release() argument
741 kfree(container_of(kobj, struct damon_sysfs_watermarks, kobj)); in damon_sysfs_watermarks_release()
780 struct kobject kobj; member
794 weights->kobj = (struct kobject){}; in damon_sysfs_weights_alloc()
801 static ssize_t sz_permil_show(struct kobject *kobj, in sz_permil_show() argument
804 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_show()
805 struct damon_sysfs_weights, kobj); in sz_permil_show()
810 static ssize_t sz_permil_store(struct kobject *kobj, in sz_permil_store() argument
813 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_store()
814 struct damon_sysfs_weights, kobj); in sz_permil_store()
820 static ssize_t nr_accesses_permil_show(struct kobject *kobj, in nr_accesses_permil_show() argument
823 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_show()
824 struct damon_sysfs_weights, kobj); in nr_accesses_permil_show()
829 static ssize_t nr_accesses_permil_store(struct kobject *kobj, in nr_accesses_permil_store() argument
832 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_store()
833 struct damon_sysfs_weights, kobj); in nr_accesses_permil_store()
839 static ssize_t age_permil_show(struct kobject *kobj, in age_permil_show() argument
842 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_show()
843 struct damon_sysfs_weights, kobj); in age_permil_show()
848 static ssize_t age_permil_store(struct kobject *kobj, in age_permil_store() argument
851 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_store()
852 struct damon_sysfs_weights, kobj); in age_permil_store()
858 static void damon_sysfs_weights_release(struct kobject *kobj) in damon_sysfs_weights_release() argument
860 kfree(container_of(kobj, struct damon_sysfs_weights, kobj)); in damon_sysfs_weights_release()
891 struct kobject kobj; member
912 err = kobject_init_and_add(&weights->kobj, &damon_sysfs_weights_ktype, in damon_sysfs_quotas_add_dirs()
913 &quotas->kobj, "weights"); in damon_sysfs_quotas_add_dirs()
915 kobject_put(&weights->kobj); in damon_sysfs_quotas_add_dirs()
923 kobject_put(&quotas->weights->kobj); in damon_sysfs_quotas_rm_dirs()
926 static ssize_t ms_show(struct kobject *kobj, struct kobj_attribute *attr, in ms_show() argument
929 struct damon_sysfs_quotas *quotas = container_of(kobj, in ms_show()
930 struct damon_sysfs_quotas, kobj); in ms_show()
935 static ssize_t ms_store(struct kobject *kobj, struct kobj_attribute *attr, in ms_store() argument
938 struct damon_sysfs_quotas *quotas = container_of(kobj, in ms_store()
939 struct damon_sysfs_quotas, kobj); in ms_store()
947 static ssize_t bytes_show(struct kobject *kobj, struct kobj_attribute *attr, in bytes_show() argument
950 struct damon_sysfs_quotas *quotas = container_of(kobj, in bytes_show()
951 struct damon_sysfs_quotas, kobj); in bytes_show()
956 static ssize_t bytes_store(struct kobject *kobj, in bytes_store() argument
959 struct damon_sysfs_quotas *quotas = container_of(kobj, in bytes_store()
960 struct damon_sysfs_quotas, kobj); in bytes_store()
968 static ssize_t reset_interval_ms_show(struct kobject *kobj, in reset_interval_ms_show() argument
971 struct damon_sysfs_quotas *quotas = container_of(kobj, in reset_interval_ms_show()
972 struct damon_sysfs_quotas, kobj); in reset_interval_ms_show()
977 static ssize_t reset_interval_ms_store(struct kobject *kobj, in reset_interval_ms_store() argument
980 struct damon_sysfs_quotas *quotas = container_of(kobj, in reset_interval_ms_store()
981 struct damon_sysfs_quotas, kobj); in reset_interval_ms_store()
989 static void damon_sysfs_quotas_release(struct kobject *kobj) in damon_sysfs_quotas_release() argument
991 kfree(container_of(kobj, struct damon_sysfs_quotas, kobj)); in damon_sysfs_quotas_release()
1022 struct kobject kobj; member
1036 access_pattern->kobj = (struct kobject){}; in damon_sysfs_access_pattern_alloc()
1050 err = kobject_init_and_add(&range->kobj, &damon_sysfs_ul_range_ktype, in damon_sysfs_access_pattern_add_range_dir()
1051 &access_pattern->kobj, name); in damon_sysfs_access_pattern_add_range_dir()
1053 kobject_put(&range->kobj); in damon_sysfs_access_pattern_add_range_dir()
1081 kobject_put(&access_pattern->age->kobj); in damon_sysfs_access_pattern_add_dirs()
1084 kobject_put(&access_pattern->nr_accesses->kobj); in damon_sysfs_access_pattern_add_dirs()
1087 kobject_put(&access_pattern->sz->kobj); in damon_sysfs_access_pattern_add_dirs()
1095 kobject_put(&access_pattern->sz->kobj); in damon_sysfs_access_pattern_rm_dirs()
1096 kobject_put(&access_pattern->nr_accesses->kobj); in damon_sysfs_access_pattern_rm_dirs()
1097 kobject_put(&access_pattern->age->kobj); in damon_sysfs_access_pattern_rm_dirs()
1100 static void damon_sysfs_access_pattern_release(struct kobject *kobj) in damon_sysfs_access_pattern_release() argument
1102 kfree(container_of(kobj, struct damon_sysfs_access_pattern, kobj)); in damon_sysfs_access_pattern_release()
1121 struct kobject kobj; member
1151 scheme->kobj = (struct kobject){}; in damon_sysfs_scheme_alloc()
1165 err = kobject_init_and_add(&access_pattern->kobj, in damon_sysfs_scheme_set_access_pattern()
1166 &damon_sysfs_access_pattern_ktype, &scheme->kobj, in damon_sysfs_scheme_set_access_pattern()
1177 kobject_put(&access_pattern->kobj); in damon_sysfs_scheme_set_access_pattern()
1188 err = kobject_init_and_add(&quotas->kobj, &damon_sysfs_quotas_ktype, in damon_sysfs_scheme_set_quotas()
1189 &scheme->kobj, "quotas"); in damon_sysfs_scheme_set_quotas()
1199 kobject_put(&quotas->kobj); in damon_sysfs_scheme_set_quotas()
1211 err = kobject_init_and_add(&watermarks->kobj, in damon_sysfs_scheme_set_watermarks()
1212 &damon_sysfs_watermarks_ktype, &scheme->kobj, in damon_sysfs_scheme_set_watermarks()
1215 kobject_put(&watermarks->kobj); in damon_sysfs_scheme_set_watermarks()
1229 err = kobject_init_and_add(&filters->kobj, in damon_sysfs_scheme_set_filters()
1230 &damon_sysfs_scheme_filters_ktype, &scheme->kobj, in damon_sysfs_scheme_set_filters()
1233 kobject_put(&filters->kobj); in damon_sysfs_scheme_set_filters()
1246 err = kobject_init_and_add(&stats->kobj, &damon_sysfs_stats_ktype, in damon_sysfs_scheme_set_stats()
1247 &scheme->kobj, "stats"); in damon_sysfs_scheme_set_stats()
1249 kobject_put(&stats->kobj); in damon_sysfs_scheme_set_stats()
1264 err = kobject_init_and_add(&tried_regions->kobj, in damon_sysfs_scheme_set_tried_regions()
1265 &damon_sysfs_scheme_regions_ktype, &scheme->kobj, in damon_sysfs_scheme_set_tried_regions()
1268 kobject_put(&tried_regions->kobj); in damon_sysfs_scheme_set_tried_regions()
1299 kobject_put(&scheme->tried_regions->kobj); in damon_sysfs_scheme_add_dirs()
1302 kobject_put(&scheme->filters->kobj); in damon_sysfs_scheme_add_dirs()
1305 kobject_put(&scheme->watermarks->kobj); in damon_sysfs_scheme_add_dirs()
1308 kobject_put(&scheme->quotas->kobj); in damon_sysfs_scheme_add_dirs()
1311 kobject_put(&scheme->access_pattern->kobj); in damon_sysfs_scheme_add_dirs()
1319 kobject_put(&scheme->access_pattern->kobj); in damon_sysfs_scheme_rm_dirs()
1321 kobject_put(&scheme->quotas->kobj); in damon_sysfs_scheme_rm_dirs()
1322 kobject_put(&scheme->watermarks->kobj); in damon_sysfs_scheme_rm_dirs()
1324 kobject_put(&scheme->filters->kobj); in damon_sysfs_scheme_rm_dirs()
1325 kobject_put(&scheme->stats->kobj); in damon_sysfs_scheme_rm_dirs()
1327 kobject_put(&scheme->tried_regions->kobj); in damon_sysfs_scheme_rm_dirs()
1330 static ssize_t action_show(struct kobject *kobj, struct kobj_attribute *attr, in action_show() argument
1333 struct damon_sysfs_scheme *scheme = container_of(kobj, in action_show()
1334 struct damon_sysfs_scheme, kobj); in action_show()
1340 static ssize_t action_store(struct kobject *kobj, struct kobj_attribute *attr, in action_store() argument
1343 struct damon_sysfs_scheme *scheme = container_of(kobj, in action_store()
1344 struct damon_sysfs_scheme, kobj); in action_store()
1356 static void damon_sysfs_scheme_release(struct kobject *kobj) in damon_sysfs_scheme_release() argument
1358 kfree(container_of(kobj, struct damon_sysfs_scheme, kobj)); in damon_sysfs_scheme_release()
1392 kobject_put(&schemes_arr[i]->kobj); in damon_sysfs_schemes_rm_dirs()
1422 err = kobject_init_and_add(&scheme->kobj, in damon_sysfs_schemes_add_dirs()
1423 &damon_sysfs_scheme_ktype, &schemes->kobj, in damon_sysfs_schemes_add_dirs()
1438 kobject_put(&scheme->kobj); in damon_sysfs_schemes_add_dirs()
1442 static ssize_t nr_schemes_show(struct kobject *kobj, in nr_schemes_show() argument
1445 struct damon_sysfs_schemes *schemes = container_of(kobj, in nr_schemes_show()
1446 struct damon_sysfs_schemes, kobj); in nr_schemes_show()
1451 static ssize_t nr_schemes_store(struct kobject *kobj, in nr_schemes_store() argument
1462 schemes = container_of(kobj, struct damon_sysfs_schemes, kobj); in nr_schemes_store()
1473 static void damon_sysfs_schemes_release(struct kobject *kobj) in damon_sysfs_schemes_release() argument
1475 kfree(container_of(kobj, struct damon_sysfs_schemes, kobj)); in damon_sysfs_schemes_release()
1757 if (kobject_init_and_add(&region->kobj, in damon_sysfs_before_damos_apply()
1759 &sysfs_regions->kobj, "%d", in damon_sysfs_before_damos_apply()
1761 kobject_put(&region->kobj); in damon_sysfs_before_damos_apply()