[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GFP_XXX semantics (was: Re: [PATCH] 2.2.1{3,4,5} VM fix)
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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/