Re: [RFC PATCH] docs/core-api: add memory allocation guide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 15-08-18 12:04:29, Mike Rapoport wrote:
[...]
> How about:
> 
> * If the allocation is performed from an atomic context, e.g interrupt
>   handler, use ``GFP_NOWARN``. This flag prevents direct reclaim and IO or
>   filesystem operations. Consequently, under memory pressure ``GFP_NOWARN``
>   allocation is likely to fail.

s@NOWARN@NOWAIT@ I guess. Looks good otherwise. I would even go and
mention GFP_NOWARN once you brought it up. Allocations which have a
reasonable fallback should be using NOWARN.

> * If you think that accessing memory reserves is justified and the kernel
>   will be stressed unless allocation succeeds, you may use ``GFP_ATOMIC``.

OK otherwise.
-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux