Lines Matching defs:new

146 	 * register_event() callback will be used to add new userspace
409 struct memcg_shrinker_map *new, *old;
421 new = kvmalloc_node(sizeof(*new) + size, GFP_KERNEL, nid);
422 if (!new)
425 /* Set all old bits, clear all new bits */
426 memset(new->map, (int)0xff, old_size);
427 memset((void *)new->map + old_size, 0, size - old_size);
429 rcu_assign_pointer(memcg->nodeinfo[nid]->shrinker_map, new);
1215 * new one might jump in right at the end of
3034 * There's no space for the new id in memcg_caches arrays,
3273 * so it's better to ignore it and try grab some new pages.
3383 * Make sure that the new limit (memsw or memory limit) doesn't
4335 struct mem_cgroup_threshold_ary *new;
4355 /* Check if a threshold crossed before adding a new one */
4361 /* Allocate memory for new array of thresholds */
4362 new = kmalloc(struct_size(new, entries, size), GFP_KERNEL);
4363 if (!new) {
4367 new->size = size;
4369 /* Copy thresholds (if any) to new array */
4371 memcpy(new->entries, thresholds->primary->entries,
4372 flex_array_size(new, entries, size - 1));
4374 /* Add new threshold */
4375 new->entries[size - 1].eventfd = eventfd;
4376 new->entries[size - 1].threshold = threshold;
4378 /* Sort thresholds. Registering of new threshold isn't time-critical */
4379 sort(new->entries, size, sizeof(*new->entries),
4383 new->current_threshold = -1;
4385 if (new->entries[i].threshold <= usage) {
4387 * new->current_threshold will not be used until
4391 ++new->current_threshold;
4400 rcu_assign_pointer(thresholds->primary, new);
4427 struct mem_cgroup_threshold_ary *new;
4448 /* Calculate new number of threshold */
4457 new = thresholds->spare;
4465 kfree(new);
4466 new = NULL;
4470 new->size = size;
4473 new->current_threshold = -1;
4478 new->entries[j] = thresholds->primary->entries[i];
4479 if (new->entries[j].threshold <= usage) {
4481 * new->current_threshold will not be used
4485 ++new->current_threshold;
4494 rcu_assign_pointer(thresholds->primary, new);
4500 if (!new) {
4783 * off again. Also, don't start a new one if there's
4901 * Parse input and register new cgroup event handler.
5192 * relatively small ID space and prevent the creation of new cgroups
5745 * This function doesn't do "charge" to new cgroup and doesn't do "uncharge"
5822 * All state has been migrated, let's switch to the new memcg.
5831 * new memcg that isn't locked, the above state can change
6927 * new swapcache page, finish the transfer by uncharging the swap
7118 /* Page cache replacement: new page already charged? */
7127 /* Force-charge the new page. The old one will be freed soon */