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