From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] mm: fix dma_poor_create
Date: Tue, 19 Feb 2008 23:50:35 -0800 [thread overview]
Message-ID: <200802192350.36247.yinghai.lu@sun.com> (raw)
In-Reply-To: <20080220065230.GG7493@elte.hu>
On Tuesday 19 February 2008 10:52:30 pm Ingo Molnar wrote:
>
> * Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
>
> > dev_to_node could return node that without RAM. So check it before use
> > it in kmalloc_node
>
> > - retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev));
> > + node = dev_to_node(dev);
> > + if (node == -1 || !node_online(node))
> > + node = numa_node_id();
> > +
> > + retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, node);
>
> so this is about not crashing during bootup on nodes that have CPUs but
> which have no node-specific memory attached, right?
>
> Shouldnt kmalloc_node() be made more robust instead? I.e. push the same
> code into kmalloc_node() - and make sure it will allocate _something_?
> That would probably also fix a similar bug in net/core/skbuff.c's
> __netdev_alloc_skb(), which too passes a dev_to_node() result to an
> allocator.
sound good idea to update the dev_to_node to make sure it will return -1 or the one is online.
Will send updated one.
YH
prev parent reply other threads:[~2008-02-20 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 2:45 Yinghai Lu
2008-02-20 6:52 ` Ingo Molnar
2008-02-20 7:50 ` Yinghai Lu [this message]
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=200802192350.36247.yinghai.lu@sun.com \
--to=yinghai.lu@sun.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
Powered by JetHome