linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: William Kucharski <william.kucharski@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_alloc: check return value of memblock_alloc_node_nopanic()
Date: Thu, 17 Jan 2019 13:26:11 +0200	[thread overview]
Message-ID: <20190117112611.GB3710@rapoport-lnx> (raw)
In-Reply-To: <5195030D-7ED9-4074-AB6C-92A3AFF11E00@oracle.com>

On Thu, Jan 17, 2019 at 03:19:35AM -0700, William Kucharski wrote:
> 
> This seems very reasonable, but if the code is just going to panic if the
> allocation fails, why not call memblock_alloc_node() instead?

I've sent patches [1] that remove panic() from memblock_alloc*() and drop
_nopanic variants. After they will be (hopefully) merged,
memblock_alloc_node() will return NULL on error.
 
> If there is a reason we'd prefer to call memblock_alloc_node_nopanic(),
> I'd like to see pgdat->nodeid printed in the panic message as well.

Sure.

[1] https://lore.kernel.org/lkml/1547646261-32535-1-git-send-email-rppt@linux.ibm.com/

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2019-01-17 11:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  6:51 Mike Rapoport
2019-01-17 10:19 ` William Kucharski
2019-01-17 11:26   ` Mike Rapoport [this message]
2019-01-17 13:34     ` William Kucharski

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=20190117112611.GB3710@rapoport-lnx \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=william.kucharski@oracle.com \
    /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