on-internet
← Community

Is __vmalloc(size, GFP_NOWAIT) really guaranteed not to sleep?

Stack Overflow ·

I'm working on a kernel module where I need to allocate a few gigabytes of memory. I want the allocation to fail rather than sleep if it cannot be satisfied immediately. However, I haven't been able to find any documentation stating whether __vmalloc(size, GFP_NOWAIT) is actually guaranteed not to sleep. The only relevant information I've found is this comment in the kernel source: https://github.com/torvalds/linux/blob/master/mm/vmalloc.c#L3987-L3988 I'd like to double-check my understanding with people who are more familiar with this part of the kernel. Thanks!

Comments

Sign in or sign up to comment and upvote.

No comments yet.