Lines Matching refs:batch
2274 struct memcg_batch_info *batch = NULL;
2280 batch = ¤t->memcg_batch;
2286 if (!batch->memcg)
2287 batch->memcg = mem;
2296 if (!batch->do_batch || test_thread_flag(TIF_MEMDIE))
2300 * In typical case, batch->memcg == mem. This means we can
2304 if (batch->memcg != mem)
2307 batch->bytes += PAGE_SIZE;
2309 batch->memsw_bytes += PAGE_SIZE;
2315 if (unlikely(batch->memcg != mem))
2435 struct memcg_batch_info *batch = ¤t->memcg_batch;
2437 if (!batch->do_batch)
2440 batch->do_batch--;
2441 if (batch->do_batch) /* If stacked, do nothing. */
2444 if (!batch->memcg)
2447 * This "batch->memcg" is valid without any css_get/put etc...
2450 if (batch->bytes)
2451 res_counter_uncharge(&batch->memcg->res, batch->bytes);
2452 if (batch->memsw_bytes)
2453 res_counter_uncharge(&batch->memcg->memsw, batch->memsw_bytes);
2454 memcg_oom_recover(batch->memcg);
2456 batch->memcg = NULL;