• Home
  • Raw
  • Download

Lines Matching refs:i

143 	struct misc_cg *i, *j;  in misc_cg_try_charge()  local
154 for (i = cg; i; i = parent_misc(i)) { in misc_cg_try_charge()
155 res = &i->res[type]; in misc_cg_try_charge()
167 for (j = i; j; j = parent_misc(j)) { in misc_cg_try_charge()
172 for (j = cg; j != i; j = parent_misc(j)) in misc_cg_try_charge()
174 misc_cg_cancel_charge(type, i, amount); in misc_cg_try_charge()
190 struct misc_cg *i; in misc_cg_uncharge() local
195 for (i = cg; i; i = parent_misc(i)) in misc_cg_uncharge()
196 misc_cg_cancel_charge(type, i, amount); in misc_cg_uncharge()
210 int i; in misc_cg_max_show() local
214 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_cg_max_show()
215 if (READ_ONCE(misc_res_capacity[i])) { in misc_cg_max_show()
216 max = READ_ONCE(cg->res[i].max); in misc_cg_max_show()
218 seq_printf(sf, "%s max\n", misc_res_name[i]); in misc_cg_max_show()
220 seq_printf(sf, "%s %lu\n", misc_res_name[i], in misc_cg_max_show()
251 int ret = 0, i; in misc_cg_max_write() local
261 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_cg_max_write()
262 if (!strcmp(misc_res_name[i], token)) { in misc_cg_max_write()
263 type = i; in misc_cg_max_write()
299 int i; in misc_cg_current_show() local
303 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_cg_current_show()
304 usage = atomic_long_read(&cg->res[i].usage); in misc_cg_current_show()
305 if (READ_ONCE(misc_res_capacity[i]) || usage) in misc_cg_current_show()
306 seq_printf(sf, "%s %lu\n", misc_res_name[i], usage); in misc_cg_current_show()
324 int i; in misc_cg_capacity_show() local
327 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_cg_capacity_show()
328 cap = READ_ONCE(misc_res_capacity[i]); in misc_cg_capacity_show()
330 seq_printf(sf, "%s %lu\n", misc_res_name[i], cap); in misc_cg_capacity_show()
339 unsigned long events, i; in misc_events_show() local
341 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_events_show()
342 events = atomic_long_read(&cg->res[i].events); in misc_events_show()
343 if (READ_ONCE(misc_res_capacity[i]) || events) in misc_events_show()
344 seq_printf(sf, "%s.max %lu\n", misc_res_name[i], events); in misc_events_show()
388 enum misc_res_type i; in misc_cg_alloc() local
399 for (i = 0; i < MISC_CG_RES_TYPES; i++) { in misc_cg_alloc()
400 WRITE_ONCE(cg->res[i].max, MAX_NUM); in misc_cg_alloc()
401 atomic_long_set(&cg->res[i].usage, 0); in misc_cg_alloc()