• Home
  • Raw
  • Download

Lines Matching refs:new

410 	struct memcg_shrinker_map *new, *old;  in memcg_expand_one_shrinker_map()  local
422 new = kvmalloc_node(sizeof(*new) + size, GFP_KERNEL, nid); in memcg_expand_one_shrinker_map()
423 if (!new) in memcg_expand_one_shrinker_map()
427 memset(new->map, (int)0xff, old_size); in memcg_expand_one_shrinker_map()
428 memset((void *)new->map + old_size, 0, size - old_size); in memcg_expand_one_shrinker_map()
430 rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, new); in memcg_expand_one_shrinker_map()
4329 struct mem_cgroup_threshold_ary *new; in __mem_cgroup_usage_register_event() local
4356 new = kmalloc(struct_size(new, entries, size), GFP_KERNEL); in __mem_cgroup_usage_register_event()
4357 if (!new) { in __mem_cgroup_usage_register_event()
4361 new->size = size; in __mem_cgroup_usage_register_event()
4365 memcpy(new->entries, thresholds->primary->entries, in __mem_cgroup_usage_register_event()
4366 flex_array_size(new, entries, size - 1)); in __mem_cgroup_usage_register_event()
4369 new->entries[size - 1].eventfd = eventfd; in __mem_cgroup_usage_register_event()
4370 new->entries[size - 1].threshold = threshold; in __mem_cgroup_usage_register_event()
4373 sort(new->entries, size, sizeof(*new->entries), in __mem_cgroup_usage_register_event()
4377 new->current_threshold = -1; in __mem_cgroup_usage_register_event()
4379 if (new->entries[i].threshold <= usage) { in __mem_cgroup_usage_register_event()
4385 ++new->current_threshold; in __mem_cgroup_usage_register_event()
4394 rcu_assign_pointer(thresholds->primary, new); in __mem_cgroup_usage_register_event()
4421 struct mem_cgroup_threshold_ary *new; in __mem_cgroup_usage_unregister_event() local
4451 new = thresholds->spare; in __mem_cgroup_usage_unregister_event()
4459 kfree(new); in __mem_cgroup_usage_unregister_event()
4460 new = NULL; in __mem_cgroup_usage_unregister_event()
4464 new->size = size; in __mem_cgroup_usage_unregister_event()
4467 new->current_threshold = -1; in __mem_cgroup_usage_unregister_event()
4472 new->entries[j] = thresholds->primary->entries[i]; in __mem_cgroup_usage_unregister_event()
4473 if (new->entries[j].threshold <= usage) { in __mem_cgroup_usage_unregister_event()
4479 ++new->current_threshold; in __mem_cgroup_usage_unregister_event()
4488 rcu_assign_pointer(thresholds->primary, new); in __mem_cgroup_usage_unregister_event()
4494 if (!new) { in __mem_cgroup_usage_unregister_event()