Lines Matching refs:weights
404 struct damon_sysfs_weights *weights = kmalloc(sizeof(*weights), in damon_sysfs_weights_alloc() local
407 if (!weights) in damon_sysfs_weights_alloc()
409 weights->kobj = (struct kobject){}; in damon_sysfs_weights_alloc()
410 weights->sz = sz; in damon_sysfs_weights_alloc()
411 weights->nr_accesses = nr_accesses; in damon_sysfs_weights_alloc()
412 weights->age = age; in damon_sysfs_weights_alloc()
413 return weights; in damon_sysfs_weights_alloc()
419 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_show() local
422 return sysfs_emit(buf, "%u\n", weights->sz); in sz_permil_show()
428 struct damon_sysfs_weights *weights = container_of(kobj, in sz_permil_store() local
430 int err = kstrtouint(buf, 0, &weights->sz); in sz_permil_store()
438 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_show() local
441 return sysfs_emit(buf, "%u\n", weights->nr_accesses); in nr_accesses_permil_show()
447 struct damon_sysfs_weights *weights = container_of(kobj, in nr_accesses_permil_store() local
449 int err = kstrtouint(buf, 0, &weights->nr_accesses); in nr_accesses_permil_store()
457 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_show() local
460 return sysfs_emit(buf, "%u\n", weights->age); in age_permil_show()
466 struct damon_sysfs_weights *weights = container_of(kobj, in age_permil_store() local
468 int err = kstrtouint(buf, 0, &weights->age); in age_permil_store()
507 struct damon_sysfs_weights *weights; member
520 struct damon_sysfs_weights *weights; in damon_sysfs_quotas_add_dirs() local
523 weights = damon_sysfs_weights_alloc(0, 0, 0); in damon_sysfs_quotas_add_dirs()
524 if (!weights) in damon_sysfs_quotas_add_dirs()
527 err = kobject_init_and_add(&weights->kobj, &damon_sysfs_weights_ktype, in damon_sysfs_quotas_add_dirs()
530 kobject_put(&weights->kobj); in damon_sysfs_quotas_add_dirs()
532 quotas->weights = weights; in damon_sysfs_quotas_add_dirs()
538 kobject_put("as->weights->kobj); in damon_sysfs_quotas_rm_dirs()
2255 struct damon_sysfs_weights *sysfs_weights = sysfs_quotas->weights; in damon_sysfs_mk_scheme()
2292 struct damon_sysfs_weights *sysfs_weights = sysfs_quotas->weights; in damon_sysfs_update_scheme()