Lines Matching refs:vm
208 static bool try_release_thread_stack_to_cache(struct vm_struct *vm) in try_release_thread_stack_to_cache() argument
213 if (this_cpu_cmpxchg(cached_stacks[i], NULL, vm) != NULL) in try_release_thread_stack_to_cache()
256 static int memcg_charge_kernel_stack(struct vm_struct *vm) in memcg_charge_kernel_stack() argument
262 BUG_ON(vm->nr_pages != THREAD_SIZE / PAGE_SIZE); in memcg_charge_kernel_stack()
265 ret = memcg_kmem_charge_page(vm->pages[i], GFP_KERNEL, 0); in memcg_charge_kernel_stack()
277 memcg_kmem_uncharge_page(vm->pages[i], 0); in memcg_charge_kernel_stack()
283 struct vm_struct *vm; in alloc_thread_stack_node() local
326 vm = find_vm_area(stack); in alloc_thread_stack_node()
327 if (memcg_charge_kernel_stack(vm)) { in alloc_thread_stack_node()
336 tsk->stack_vm_area = vm; in alloc_thread_stack_node()
562 struct vm_struct *vm = task_stack_vm_area(tsk); in account_kernel_stack() local
566 mod_lruvec_page_state(vm->pages[i], NR_KERNEL_STACK_KB, in account_kernel_stack()
582 struct vm_struct *vm; in exit_task_stack_account() local
585 vm = task_stack_vm_area(tsk); in exit_task_stack_account()
587 memcg_kmem_uncharge_page(vm->pages[i], 0); in exit_task_stack_account()