copy and paste this google map to your website or blog!
Press copy button and paste into your blog or website.
(Please switch to 'HTML' mode when posting into your blog. Examples: WordPress Example, Blogger Example)
Memory Allocation Guide — The Linux Kernel documentation If you think that accessing memory reserves is justified and the kernel will be stressed unless allocation succeeds, you may use GFP_ATOMIC Untrusted allocations triggered from userspace should be a subject of kmem accounting and must have __GFP_ACCOUNT bit set
linux kernel - How does GFP_ATOMIC prevent sleep - Stack Overflow GFP_ATOMIC prevents sleeping by telling the memory allocation code that it's not allowed to sleep to satisfy the allocation - that's all If the memory allocation code needs to sleep, and GFP_ATOMIC has been passed, then it will return an error to the caller instead
Kernel Korner - Allocating Memory in the Kernel - Linux Journal Many different flags can be used; allocating memory in the kernel is nontrivial It is possible to control many aspects of memory allocation in the kernel Your code should use the type flags and not the individual action and zone modifiers The two most common flags are GFP_ATOMIC and GFP_KERNEL
Which Allocation Method Should I Use? - Litux Specify the GFP_ATOMIC flag to perform a high priority allocation that will not sleep This is a requirement of interrupt handlers and other pieces of code that cannot sleep Code that can sleep, such as process context code that does not hold a spin lock, should use GFP_KERNEL
Atomic context and kernel API design - LWN. net When the kernel is running in process context, it is allowed to go to sleep if necessary But when the kernel is running in atomic context, things like sleeping are not allowed Code which handles hardware and software interrupts is one obvious example of atomic context
Dynamic DMA mapping using the generic device - Kernel Pass GFP_ATOMIC to prevent blocking, or if it’s permitted (not in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow blocking Like dma_alloc_coherent (), this returns two values: an address usable by the CPU, and the DMA address usable by the pool’s device