Lines Matching refs:stock
1730 struct memcg_stock_pcp *stock; in consume_stock() local
1733 stock = &get_cpu_var(memcg_stock); in consume_stock()
1734 if (mem == stock->cached && stock->nr_pages) in consume_stock()
1735 stock->nr_pages--; in consume_stock()
1745 static void drain_stock(struct memcg_stock_pcp *stock) in drain_stock() argument
1747 struct mem_cgroup *old = stock->cached; in drain_stock()
1749 if (stock->nr_pages) { in drain_stock()
1750 unsigned long bytes = stock->nr_pages * PAGE_SIZE; in drain_stock()
1755 stock->nr_pages = 0; in drain_stock()
1757 stock->cached = NULL; in drain_stock()
1766 struct memcg_stock_pcp *stock = &__get_cpu_var(memcg_stock); in drain_local_stock() local
1767 drain_stock(stock); in drain_local_stock()
1776 struct memcg_stock_pcp *stock = &get_cpu_var(memcg_stock); in refill_stock() local
1778 if (stock->cached != mem) { /* reset if necessary */ in refill_stock()
1779 drain_stock(stock); in refill_stock()
1780 stock->cached = mem; in refill_stock()
1782 stock->nr_pages += nr_pages; in refill_stock()
1807 struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu); in drain_all_stock_async() local
1808 schedule_work_on(cpu, &stock->work); in drain_all_stock_async()
1864 struct memcg_stock_pcp *stock; in memcg_cpu_hotplug_callback() local
1879 stock = &per_cpu(memcg_stock, cpu); in memcg_cpu_hotplug_callback()
1880 drain_stock(stock); in memcg_cpu_hotplug_callback()
4573 struct memcg_stock_pcp *stock = in mem_cgroup_create() local
4575 INIT_WORK(&stock->work, drain_local_stock); in mem_cgroup_create()