예제 #1
0
void account_kernel_stack(struct thread_info *ti, int account)
#endif
{
	struct zone *zone = page_zone(virt_to_page(ti));

	mod_zone_page_state(zone, NR_KERNEL_STACK, account);
}
예제 #2
0
static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool)
{
    struct page *page;

    page = alloc_pages(pool->gfp_mask & ~__GFP_ZERO, pool->order);

    if (!page)
        return NULL;
    mod_zone_page_state(page_zone(page), NR_ION_PAGES, 1 << pool->order);

    if (pool->gfp_mask & __GFP_ZERO)
        if (msm_ion_heap_high_order_page_zero(page, pool->order))
            goto error_free_pages;

    return page;
error_free_pages:
    __free_pages(page, pool->order);
    mod_zone_page_state(page_zone(page), NR_ION_PAGES, -(1 << pool->order));
    return NULL;
}
예제 #3
0
static void ion_page_pool_free_pages(struct ion_page_pool *pool,
                                     struct page *page)
{
    __free_pages(page, pool->order);
    mod_zone_page_state(page_zone(page), NR_ION_PAGES, -(1 << pool->order));
}