[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQWoR_CJd8GD5i5jeFm=_ghUsdTwx8LbP8DnwgdEHo64uQ@mail.gmail.com>
Date: Sat, 23 Jun 2012 15:35:37 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Johannes Weiner <hannes@...xchg.org>
Cc: akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
davem@...emloft.net, shangw@...ux.vnet.ibm.com, tj@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [patch 046/181] mm: remove sparsemem allocation details from the
bootmem allocator
On Sat, Jun 23, 2012 at 3:06 PM, Johannes Weiner <hannes@...xchg.org> wrote:
> On Sat, Jun 23, 2012 at 11:58:02AM -0700, Yinghai Lu wrote:
>> +again:
>> + p = ___alloc_bootmem_node_nopanic(NODE_DATA(nid), size,
>> + SMP_CACHE_BYTES, goal, limit);
>> + if (!p && limit) {
>> + limit = 0;
>> + goto again;
>> + }
>
> I was aware that __alloc_bootmem_node_nopanic does a slightly
> different fallback sequence, but as soon as you go outside the
> section, you have a node-section-dependency either way.
you need to make sure, first try to get the in the same section, then same node.
>
> Without this patch, it would retry without the node first, then
> without the goal. With your patch, you would try to limit the upper
> end, but you may already go below the requested section. What would
> the limit gain?
goal: start of section
limit: start of next section.
the layout should be
start_of_range_same_node...start_of_range_same_section....end_of_range_same_section...end_of_range_of_same_node.
before your commit:
1. first try: start_of_range_same_section....end_of_range_same_section
2. second try: on same node.
with your commit:
1. first try: start_of_range_same_section....end_of_range_same_node.
===> it would get buffer out of same section.
2. second try: 0...0, aka 0... -1UL
with this patch:
1. first try: start_of_range_same_section....end_of_range_same_section
2. second try: 0...end_of_range_of_same_section.
3. third try: start_of_range_same_section...0, aka
tart_of_range_same_section...-1UL;
4. third try: 0...0, aka 0...-1UL;
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists