archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <>
To: Mike Rapoport <>
Cc:, Jonathan Corbet <>,
	Matthew Wilcox <>,
	Vlastimil Babka <>,,
Subject: Re: [RFC PATCH] docs/core-api: add memory allocation guide
Date: Wed, 15 Aug 2018 11:30:32 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20180815090428.GD24091@rapoport-lnx>

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

  reply	other threads:[~2018-08-15  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2018-08-15  6:36 ` [RFC PATCH] docs/core-api: add memory allocation guide Mike Rapoport
2018-08-15  8:15   ` Michal Hocko
2018-08-15  9:04     ` Mike Rapoport
2018-08-15  9:30       ` Michal Hocko [this message]
2018-08-15 17:14 ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).