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
132 regions->kobj = (struct kobject){}; in damon_sysfs_scheme_regions_alloc()
139 static ssize_t total_bytes_show(struct kobject *kobj, in total_bytes_show() argument
142 struct damon_sysfs_scheme_regions *regions = container_of(kobj, in total_bytes_show()
143 struct damon_sysfs_scheme_regions, kobj); in total_bytes_show()
155 kobject_put(&r->kobj); in damon_sysfs_scheme_regions_rm_dirs()
160 static void damon_sysfs_scheme_regions_release(struct kobject *kobj) in damon_sysfs_scheme_regions_release() argument
162 kfree(container_of(kobj, struct damon_sysfs_scheme_regions, kobj)); in damon_sysfs_scheme_regions_release()
185 struct kobject kobj; member
198 static ssize_t nr_tried_show(struct kobject *kobj, struct kobj_attribute *attr, in nr_tried_show() argument
201 struct damon_sysfs_stats *stats = container_of(kobj, in nr_tried_show()
202 struct damon_sysfs_stats, kobj); in nr_tried_show()
207 static ssize_t sz_tried_show(struct kobject *kobj, struct kobj_attribute *attr, in sz_tried_show() argument
210 struct damon_sysfs_stats *stats = container_of(kobj, in sz_tried_show()
211 struct damon_sysfs_stats, kobj); in sz_tried_show()
216 static ssize_t nr_applied_show(struct kobject *kobj, in nr_applied_show() argument
219 struct damon_sysfs_stats *stats = container_of(kobj, in nr_applied_show()
220 struct damon_sysfs_stats, kobj); in nr_applied_show()
225 static ssize_t sz_applied_show(struct kobject *kobj, in sz_applied_show() argument
228 struct damon_sysfs_stats *stats = container_of(kobj, in sz_applied_show()
229 struct damon_sysfs_stats, kobj); in sz_applied_show()
234 static ssize_t qt_exceeds_show(struct kobject *kobj, in qt_exceeds_show() argument
237 struct damon_sysfs_stats *stats = container_of(kobj, in qt_exceeds_show()
238 struct damon_sysfs_stats, kobj); in qt_exceeds_show()
243 static void damon_sysfs_stats_release(struct kobject *kobj) in damon_sysfs_stats_release() argument
245 kfree(container_of(kobj, struct damon_sysfs_stats, kobj)); in damon_sysfs_stats_release()
284 struct kobject kobj; member
305 static ssize_t type_show(struct kobject *kobj, in type_show() argument
308 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in type_show()
309 struct damon_sysfs_scheme_filter, kobj); in type_show()
315 static ssize_t type_store(struct kobject *kobj, in type_store() argument
318 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in type_store()
319 struct damon_sysfs_scheme_filter, kobj); in type_store()
334 static ssize_t matching_show(struct kobject *kobj, in matching_show() argument
337 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in matching_show()
338 struct damon_sysfs_scheme_filter, kobj); in matching_show()
343 static ssize_t matching_store(struct kobject *kobj, in matching_store() argument
346 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in matching_store()
347 struct damon_sysfs_scheme_filter, kobj); in matching_store()
358 static ssize_t memcg_path_show(struct kobject *kobj, in memcg_path_show() argument
361 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in memcg_path_show()
362 struct damon_sysfs_scheme_filter, kobj); in memcg_path_show()
368 static ssize_t memcg_path_store(struct kobject *kobj, in memcg_path_store() argument
371 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in memcg_path_store()
372 struct damon_sysfs_scheme_filter, kobj); in memcg_path_store()
383 static ssize_t addr_start_show(struct kobject *kobj, in addr_start_show() argument
386 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_start_show()
387 struct damon_sysfs_scheme_filter, kobj); in addr_start_show()
392 static ssize_t addr_start_store(struct kobject *kobj, in addr_start_store() argument
395 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_start_store()
396 struct damon_sysfs_scheme_filter, kobj); in addr_start_store()
402 static ssize_t addr_end_show(struct kobject *kobj, in addr_end_show() argument
405 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_end_show()
406 struct damon_sysfs_scheme_filter, kobj); in addr_end_show()
411 static ssize_t addr_end_store(struct kobject *kobj, in addr_end_store() argument
414 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in addr_end_store()
415 struct damon_sysfs_scheme_filter, kobj); in addr_end_store()
421 static ssize_t damon_target_idx_show(struct kobject *kobj, in damon_target_idx_show() argument
424 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_target_idx_show()
425 struct damon_sysfs_scheme_filter, kobj); in damon_target_idx_show()
430 static ssize_t damon_target_idx_store(struct kobject *kobj, in damon_target_idx_store() argument
433 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_target_idx_store()
434 struct damon_sysfs_scheme_filter, kobj); in damon_target_idx_store()
440 static void damon_sysfs_scheme_filter_release(struct kobject *kobj) in damon_sysfs_scheme_filter_release() argument
442 struct damon_sysfs_scheme_filter *filter = container_of(kobj, in damon_sysfs_scheme_filter_release()
443 struct damon_sysfs_scheme_filter, kobj); in damon_sysfs_scheme_filter_release()
489 struct kobject kobj; member
507 kobject_put(&filters_arr[i]->kobj); in damon_sysfs_scheme_filters_rm_dirs()
536 err = kobject_init_and_add(&filter->kobj, in damon_sysfs_scheme_filters_add_dirs()
538 &filters->kobj, "%d", i); in damon_sysfs_scheme_filters_add_dirs()
540 kobject_put(&filter->kobj); in damon_sysfs_scheme_filters_add_dirs()
551 static ssize_t nr_filters_show(struct kobject *kobj, in nr_filters_show() argument
554 struct damon_sysfs_scheme_filters *filters = container_of(kobj, in nr_filters_show()
555 struct damon_sysfs_scheme_filters, kobj); in nr_filters_show()
560 static ssize_t nr_filters_store(struct kobject *kobj, in nr_filters_store() argument
571 filters = container_of(kobj, struct damon_sysfs_scheme_filters, kobj); in nr_filters_store()
583 static void damon_sysfs_scheme_filters_release(struct kobject *kobj) in damon_sysfs_scheme_filters_release() argument
585 kfree(container_of(kobj, struct damon_sysfs_scheme_filters, kobj)); in damon_sysfs_scheme_filters_release()
608 struct kobject kobj; member
625 watermarks->kobj = (struct kobject){}; in damon_sysfs_watermarks_alloc()
640 static ssize_t metric_show(struct kobject *kobj, struct kobj_attribute *attr, in metric_show() argument
643 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in metric_show()
644 struct damon_sysfs_watermarks, kobj); in metric_show()
650 static ssize_t metric_store(struct kobject *kobj, struct kobj_attribute *attr, in metric_store() argument
653 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in metric_store()
654 struct damon_sysfs_watermarks, kobj); in metric_store()
666 static ssize_t interval_us_show(struct kobject *kobj, in interval_us_show() argument
669 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in interval_us_show()
670 struct damon_sysfs_watermarks, kobj); in interval_us_show()
675 static ssize_t interval_us_store(struct kobject *kobj, in interval_us_store() argument
678 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in interval_us_store()
679 struct damon_sysfs_watermarks, kobj); in interval_us_store()
685 static ssize_t high_show(struct kobject *kobj, in high_show() argument
688 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in high_show()
689 struct damon_sysfs_watermarks, kobj); in high_show()
694 static ssize_t high_store(struct kobject *kobj, in high_store() argument
697 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in high_store()
698 struct damon_sysfs_watermarks, kobj); in high_store()
704 static ssize_t mid_show(struct kobject *kobj, in mid_show() argument
707 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in mid_show()
708 struct damon_sysfs_watermarks, kobj); in mid_show()
713 static ssize_t mid_store(struct kobject *kobj, in mid_store() argument
716 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in mid_store()
717 struct damon_sysfs_watermarks, kobj); in mid_store()
723 static ssize_t low_show(struct kobject *kobj, in low_show() argument
726 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in low_show()
727 struct damon_sysfs_watermarks, kobj); in low_show()
732 static ssize_t low_store(struct kobject *kobj, in low_store() argument
735 struct damon_sysfs_watermarks *watermarks = container_of(kobj, in low_store()
736 struct damon_sysfs_watermarks, kobj); in low_store()
742 static void damon_sysfs_watermarks_release(struct kobject *kobj) in damon_sysfs_watermarks_release() argument
744 kfree(container_of(kobj, struct damon_sysfs_watermarks, kobj)); in damon_sysfs_watermarks_release()
783 struct kobject kobj; member
797 weights->kobj = (struct kobject){}; in damon_sysfs_weights_alloc()
804 static ssize_t sz_permil_show(struct kobject *kobj, in sz_permil_show() argument
807 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_show()
808 struct damon_sysfs_weights, kobj); in sz_permil_show()
813 static ssize_t sz_permil_store(struct kobject *kobj, in sz_permil_store() argument
816 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_store()
817 struct damon_sysfs_weights, kobj); in sz_permil_store()
823 static ssize_t nr_accesses_permil_show(struct kobject *kobj, in nr_accesses_permil_show() argument
826 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_show()
827 struct damon_sysfs_weights, kobj); in nr_accesses_permil_show()
832 static ssize_t nr_accesses_permil_store(struct kobject *kobj, in nr_accesses_permil_store() argument
835 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_store()
836 struct damon_sysfs_weights, kobj); in nr_accesses_permil_store()
842 static ssize_t age_permil_show(struct kobject *kobj, in age_permil_show() argument
845 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_show()
846 struct damon_sysfs_weights, kobj); in age_permil_show()
851 static ssize_t age_permil_store(struct kobject *kobj, in age_permil_store() argument
854 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_store()
855 struct damon_sysfs_weights, kobj); in age_permil_store()
861 static void damon_sysfs_weights_release(struct kobject *kobj) in damon_sysfs_weights_release() argument
863 kfree(container_of(kobj, struct damon_sysfs_weights, kobj)); in damon_sysfs_weights_release()
894 struct kobject kobj; member
915 err = kobject_init_and_add(&weights->kobj, &damon_sysfs_weights_ktype, in damon_sysfs_quotas_add_dirs()
916 &quotas->kobj, "weights"); in damon_sysfs_quotas_add_dirs()
918 kobject_put(&weights->kobj); in damon_sysfs_quotas_add_dirs()
926 kobject_put(&quotas->weights->kobj); in damon_sysfs_quotas_rm_dirs()
929 static ssize_t ms_show(struct kobject *kobj, struct kobj_attribute *attr, in ms_show() argument
932 struct damon_sysfs_quotas *quotas = container_of(kobj, in ms_show()
933 struct damon_sysfs_quotas, kobj); in ms_show()
938 static ssize_t ms_store(struct kobject *kobj, struct kobj_attribute *attr, in ms_store() argument
941 struct damon_sysfs_quotas *quotas = container_of(kobj, in ms_store()
942 struct damon_sysfs_quotas, kobj); in ms_store()
950 static ssize_t bytes_show(struct kobject *kobj, struct kobj_attribute *attr, in bytes_show() argument
953 struct damon_sysfs_quotas *quotas = container_of(kobj, in bytes_show()
954 struct damon_sysfs_quotas, kobj); in bytes_show()
959 static ssize_t bytes_store(struct kobject *kobj, in bytes_store() argument
962 struct damon_sysfs_quotas *quotas = container_of(kobj, in bytes_store()
963 struct damon_sysfs_quotas, kobj); in bytes_store()
971 static ssize_t reset_interval_ms_show(struct kobject *kobj, in reset_interval_ms_show() argument
974 struct damon_sysfs_quotas *quotas = container_of(kobj, in reset_interval_ms_show()
975 struct damon_sysfs_quotas, kobj); in reset_interval_ms_show()
980 static ssize_t reset_interval_ms_store(struct kobject *kobj, in reset_interval_ms_store() argument
983 struct damon_sysfs_quotas *quotas = container_of(kobj, in reset_interval_ms_store()
984 struct damon_sysfs_quotas, kobj); in reset_interval_ms_store()
992 static void damon_sysfs_quotas_release(struct kobject *kobj) in damon_sysfs_quotas_release() argument
994 kfree(container_of(kobj, struct damon_sysfs_quotas, kobj)); in damon_sysfs_quotas_release()
1025 struct kobject kobj; member
1039 access_pattern->kobj = (struct kobject){}; in damon_sysfs_access_pattern_alloc()
1053 err = kobject_init_and_add(&range->kobj, &damon_sysfs_ul_range_ktype, in damon_sysfs_access_pattern_add_range_dir()
1054 &access_pattern->kobj, name); in damon_sysfs_access_pattern_add_range_dir()
1056 kobject_put(&range->kobj); in damon_sysfs_access_pattern_add_range_dir()
1084 kobject_put(&access_pattern->age->kobj); in damon_sysfs_access_pattern_add_dirs()
1087 kobject_put(&access_pattern->nr_accesses->kobj); in damon_sysfs_access_pattern_add_dirs()
1090 kobject_put(&access_pattern->sz->kobj); in damon_sysfs_access_pattern_add_dirs()
1098 kobject_put(&access_pattern->sz->kobj); in damon_sysfs_access_pattern_rm_dirs()
1099 kobject_put(&access_pattern->nr_accesses->kobj); in damon_sysfs_access_pattern_rm_dirs()
1100 kobject_put(&access_pattern->age->kobj); in damon_sysfs_access_pattern_rm_dirs()
1103 static void damon_sysfs_access_pattern_release(struct kobject *kobj) in damon_sysfs_access_pattern_release() argument
1105 kfree(container_of(kobj, struct damon_sysfs_access_pattern, kobj)); in damon_sysfs_access_pattern_release()
1124 struct kobject kobj; member
1154 scheme->kobj = (struct kobject){}; in damon_sysfs_scheme_alloc()
1168 err = kobject_init_and_add(&access_pattern->kobj, in damon_sysfs_scheme_set_access_pattern()
1169 &damon_sysfs_access_pattern_ktype, &scheme->kobj, in damon_sysfs_scheme_set_access_pattern()
1180 kobject_put(&access_pattern->kobj); in damon_sysfs_scheme_set_access_pattern()
1191 err = kobject_init_and_add(&quotas->kobj, &damon_sysfs_quotas_ktype, in damon_sysfs_scheme_set_quotas()
1192 &scheme->kobj, "quotas"); in damon_sysfs_scheme_set_quotas()
1202 kobject_put(&quotas->kobj); in damon_sysfs_scheme_set_quotas()
1214 err = kobject_init_and_add(&watermarks->kobj, in damon_sysfs_scheme_set_watermarks()
1215 &damon_sysfs_watermarks_ktype, &scheme->kobj, in damon_sysfs_scheme_set_watermarks()
1218 kobject_put(&watermarks->kobj); in damon_sysfs_scheme_set_watermarks()
1232 err = kobject_init_and_add(&filters->kobj, in damon_sysfs_scheme_set_filters()
1233 &damon_sysfs_scheme_filters_ktype, &scheme->kobj, in damon_sysfs_scheme_set_filters()
1236 kobject_put(&filters->kobj); in damon_sysfs_scheme_set_filters()
1249 err = kobject_init_and_add(&stats->kobj, &damon_sysfs_stats_ktype, in damon_sysfs_scheme_set_stats()
1250 &scheme->kobj, "stats"); in damon_sysfs_scheme_set_stats()
1252 kobject_put(&stats->kobj); in damon_sysfs_scheme_set_stats()
1267 err = kobject_init_and_add(&tried_regions->kobj, in damon_sysfs_scheme_set_tried_regions()
1268 &damon_sysfs_scheme_regions_ktype, &scheme->kobj, in damon_sysfs_scheme_set_tried_regions()
1271 kobject_put(&tried_regions->kobj); in damon_sysfs_scheme_set_tried_regions()
1302 kobject_put(&scheme->tried_regions->kobj); in damon_sysfs_scheme_add_dirs()
1305 kobject_put(&scheme->filters->kobj); in damon_sysfs_scheme_add_dirs()
1308 kobject_put(&scheme->watermarks->kobj); in damon_sysfs_scheme_add_dirs()
1311 kobject_put(&scheme->quotas->kobj); in damon_sysfs_scheme_add_dirs()
1314 kobject_put(&scheme->access_pattern->kobj); in damon_sysfs_scheme_add_dirs()
1322 kobject_put(&scheme->access_pattern->kobj); in damon_sysfs_scheme_rm_dirs()
1324 kobject_put(&scheme->quotas->kobj); in damon_sysfs_scheme_rm_dirs()
1325 kobject_put(&scheme->watermarks->kobj); in damon_sysfs_scheme_rm_dirs()
1327 kobject_put(&scheme->filters->kobj); in damon_sysfs_scheme_rm_dirs()
1328 kobject_put(&scheme->stats->kobj); in damon_sysfs_scheme_rm_dirs()
1330 kobject_put(&scheme->tried_regions->kobj); in damon_sysfs_scheme_rm_dirs()
1333 static ssize_t action_show(struct kobject *kobj, struct kobj_attribute *attr, in action_show() argument
1336 struct damon_sysfs_scheme *scheme = container_of(kobj, in action_show()
1337 struct damon_sysfs_scheme, kobj); in action_show()
1343 static ssize_t action_store(struct kobject *kobj, struct kobj_attribute *attr, in action_store() argument
1346 struct damon_sysfs_scheme *scheme = container_of(kobj, in action_store()
1347 struct damon_sysfs_scheme, kobj); in action_store()
1359 static void damon_sysfs_scheme_release(struct kobject *kobj) in damon_sysfs_scheme_release() argument
1361 kfree(container_of(kobj, struct damon_sysfs_scheme, kobj)); in damon_sysfs_scheme_release()
1395 kobject_put(&schemes_arr[i]->kobj); in damon_sysfs_schemes_rm_dirs()
1425 err = kobject_init_and_add(&scheme->kobj, in damon_sysfs_schemes_add_dirs()
1426 &damon_sysfs_scheme_ktype, &schemes->kobj, in damon_sysfs_schemes_add_dirs()
1441 kobject_put(&scheme->kobj); in damon_sysfs_schemes_add_dirs()
1445 static ssize_t nr_schemes_show(struct kobject *kobj, in nr_schemes_show() argument
1448 struct damon_sysfs_schemes *schemes = container_of(kobj, in nr_schemes_show()
1449 struct damon_sysfs_schemes, kobj); in nr_schemes_show()
1454 static ssize_t nr_schemes_store(struct kobject *kobj, in nr_schemes_store() argument
1465 schemes = container_of(kobj, struct damon_sysfs_schemes, kobj); in nr_schemes_store()
1476 static void damon_sysfs_schemes_release(struct kobject *kobj) in damon_sysfs_schemes_release() argument
1478 kfree(container_of(kobj, struct damon_sysfs_schemes, kobj)); in damon_sysfs_schemes_release()
1762 if (kobject_init_and_add(&region->kobj, in damon_sysfs_before_damos_apply()
1764 &sysfs_regions->kobj, "%d", in damon_sysfs_before_damos_apply()
1766 kobject_put(&region->kobj); in damon_sysfs_before_damos_apply()