Re: GFP_XXX semantics (was: Re: [PATCH] 2.2.1{3,4,5} VM fix)

From: Andi Kleen (ak@muc.de)
Date: Mon Jan 24 2000 - 08:40:51 EST


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@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:12 EST