Lines Matching refs:weights
792 struct damon_sysfs_weights *weights = kmalloc(sizeof(*weights), in damon_sysfs_weights_alloc() local
795 if (!weights) in damon_sysfs_weights_alloc()
797 weights->kobj = (struct kobject){}; in damon_sysfs_weights_alloc()
798 weights->sz = sz; in damon_sysfs_weights_alloc()
799 weights->nr_accesses = nr_accesses; in damon_sysfs_weights_alloc()
800 weights->age = age; in damon_sysfs_weights_alloc()
801 return weights; in damon_sysfs_weights_alloc()
807 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_show() local
810 return sysfs_emit(buf, "%u\n", weights->sz); in sz_permil_show()
816 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_store() local
818 int err = kstrtouint(buf, 0, &weights->sz); in sz_permil_store()
826 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_show() local
829 return sysfs_emit(buf, "%u\n", weights->nr_accesses); in nr_accesses_permil_show()
835 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_store() local
837 int err = kstrtouint(buf, 0, &weights->nr_accesses); in nr_accesses_permil_store()
845 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_show() local
848 return sysfs_emit(buf, "%u\n", weights->age); in age_permil_show()
854 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_store() local
856 int err = kstrtouint(buf, 0, &weights->age); in age_permil_store()
895 struct damon_sysfs_weights *weights; member
908 struct damon_sysfs_weights *weights; in damon_sysfs_quotas_add_dirs() local
911 weights = damon_sysfs_weights_alloc(0, 0, 0); in damon_sysfs_quotas_add_dirs()
912 if (!weights) in damon_sysfs_quotas_add_dirs()
915 err = kobject_init_and_add(&weights->kobj, &damon_sysfs_weights_ktype, in damon_sysfs_quotas_add_dirs()
918 kobject_put(&weights->kobj); in damon_sysfs_quotas_add_dirs()
920 quotas->weights = weights; in damon_sysfs_quotas_add_dirs()
926 kobject_put("as->weights->kobj); in damon_sysfs_quotas_rm_dirs()
1585 struct damon_sysfs_weights *sysfs_weights = sysfs_quotas->weights; in damon_sysfs_mk_scheme()
1635 struct damon_sysfs_weights *sysfs_weights = sysfs_quotas->weights; in damon_sysfs_update_scheme()