/* Try to consume stocked charge on this cpu. If success, PAGE_SIZE is consumed from local stock and true is returned. If the stock is 0 or charges from a cgroup which is not current target, returns false. This stock will be refilled.  */
static bool consume_stock(struct mem_cgroup *mem)
/* Try to consume stocked charge on this cpu. If success, PAGE_SIZE is consumed from local stock and true is returned. If the stock is 0 or charges from a cgroup which is not current target, returns false. This stock will be refilled.  */
static bool consume_stock(struct mem_cgroup *mem)
{
	struct memcg_stock_pcp *stock;
	bool ret = true;
	stock = &get_cpu_var(memcg_stock);
	if (mem == stock->cached && stock->charge)
		stock->charge -= PAGE_SIZE;
	else
		ret = false;
	put_cpu_var(memcg_stock);
	return ret;
}