linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org, Jonathan Corbet <corbet@lwn.net>,
	Matthew Wilcox <willy@infradead.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] docs/core-api: add memory allocation guide
Date: Wed, 15 Aug 2018 11:30:32 +0200	[thread overview]
Message-ID: <20180815093032.GQ32645@dhcp22.suse.cz> (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
SUSE Labs

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1534314887-9202-1-git-send-email-rppt@linux.vnet.ibm.com>
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20180815093032.GQ32645@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).