Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1266083 > unrolled thread

Re: [PATCHv4] mm: Don't offset memmap for flatmem

Started byTony Luck <tony.luck@gmail.com>
First post2015-11-10 00:30 +0100
Last post2015-11-10 02:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv4] mm: Don't offset memmap for flatmem Tony Luck <tony.luck@gmail.com> - 2015-11-10 00:30 +0100
    Re: [PATCHv4] mm: Don't offset memmap for flatmem Laura Abbott <laura@labbott.name> - 2015-11-10 02:40 +0100

#1266083 — Re: [PATCHv4] mm: Don't offset memmap for flatmem

FromTony Luck <tony.luck@gmail.com>
Date2015-11-10 00:30 +0100
SubjectRe: [PATCHv4] mm: Don't offset memmap for flatmem
Message-ID<qt42S-5vi-31@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

> @@ -4984,9 +4987,9 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
>          */
>         if (pgdat == NODE_DATA(0)) {
>                 mem_map = NODE_DATA(0)->node_mem_map;
> -#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
> +#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
>                 if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
> -                       mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET);
> +                       mem_map -= offset;
>  #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
>         }
>  #endif

This piece breaks ia64.  See the comment earlier in the function
that "ia64 gets its own node_mem_map" ... so we skip the initialization
of offset ... and arrive down here and just subtract "0" from mem_map.

Attached patch fixes ia64 ... does ARM still work if this is applied?

-Tony

[toc] | [next] | [standalone]


#1266155

FromLaura Abbott <laura@labbott.name>
Date2015-11-10 02:40 +0100
Message-ID<qt64G-6NO-27@gated-at.bofh.it>
In reply to#1266083
On 11/9/15 3:20 PM, Tony Luck wrote:
>> @@ -4984,9 +4987,9 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
>>           */
>>          if (pgdat == NODE_DATA(0)) {
>>                  mem_map = NODE_DATA(0)->node_mem_map;
>> -#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
>> +#if defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) || defined(CONFIG_FLATMEM)
>>                  if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
>> -                       mem_map -= (pgdat->node_start_pfn - ARCH_PFN_OFFSET);
>> +                       mem_map -= offset;
>>   #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
>>          }
>>   #endif
>
> This piece breaks ia64.  See the comment earlier in the function
> that "ia64 gets its own node_mem_map" ... so we skip the initialization
> of offset ... and arrive down here and just subtract "0" from mem_map.
>
> Attached patch fixes ia64 ... does ARM still work if this is applied?
>
> -Tony
>

Yes, this still fixes the problem for me. I see the pfn <-> page
translation working as expected.

Tested-by: Laura Abbott <laura@labbott.name>

Thanks,
Laura
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web