GFP_XXX semantics (was: Re: [PATCH] 2.2.1{3,4,5} VM fix)
Andi Kleen
ak en muc.de
Lun Ene 24 15:13:21 CST 2000
On Mon, Jan 24, 2000 at 02:22:45PM +0100, Ingo Oeser wrote:
> On Sat, 22 Jan 2000, Andrea Arcangeli wrote:
>
> [GFP-Mask semantics discussion]
>
> ok, once we are about it here, could you please explain the
> _exact_ semantics for the GFP_XXX constants?
>
> GFP_BUFFER
> GFP_ATOMIC
> GFP_BIGUSER
> GFP_USER
> GFP_KERNEL
> GFP_NFS
> GFP_KSWAPD
>
> So which steps are tried to allocate these pages (freeing
> process, freeing globally, waiting, failing, kswapd-wakeup)?
>
> Because it is not easy to decide from a driver writers point of
> view, which one to use for which requests :(
As device driver writer you should only use two:
GFP_ATOMIC in interrupts/bottom halves/when you cannot sleep and
GFP_KERNEL when you're in user context and able to sleep.
All others are internal and only used by specific subsystems you
shouldn't care about.
-Andi
--
This is like TV. I don't like TV.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda