lkml.org 
[lkml]   [2012]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: nobootmem: Correct alloc_bootmem semantics.
On Wed, Apr 25, 2012 at 07:00:34PM -0400, David Miller wrote:
> From: Yinghai Lu <yinghai@kernel.org>
> Date: Wed, 25 Apr 2012 15:46:42 -0700
>
> > On Wed, Apr 25, 2012 at 1:10 PM, David Miller <davem@davemloft.net> wrote:
> >> @@ -298,13 +298,19 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
> >>        if (WARN_ON_ONCE(slab_is_available()))
> >>                return kzalloc_node(size, GFP_NOWAIT, pgdat->node_id);
> >>
> >> +again:
> >>        ptr = __alloc_memory_core_early(pgdat->node_id, size, align,
> >>                                         goal, -1ULL);
> >>        if (ptr)
> >>                return ptr;
> >
> > If you want to be consistent to bootmem version.
> >
> > again label should be here instead.
>
> It is merely an artifact of implementation that the bootmem version
> doesn't try to respect the given node if the goal cannot be satisfied,
> and in fact I would classify that as a bug that needs to be fixed.
>
> Therefore, I believe the bootmem case is what needs to be adjusted
> instead.

Now it does: node+goal, goal, node, anywhere

whereas the memblock version of __alloc_bootmem_node_nopanic() also
still does: node+goal, goal, anywhere

Your description suggests that the node should be higher prioritized
than the goal, which I understand as: node+goal, node, anywhere.

Which do we actually want?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-05-03 17:41    [W:0.077 / U:1.804 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site