From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Wen Congyang <wency@cn.fujitsu.com>,
Tang Chen <tangchen@cn.fujitsu.com>,
Toshi Kani <toshi.kani@hp.com>,
isimatu.yasuaki@jp.fujitsu.com, Linux MM <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] mm/sparsemem: Fix a bug in free_map_bootmem when CONFIG_SPARSEMEM_VMEMMAP
Date: Sun, 06 Oct 2013 00:45:45 +0800 [thread overview]
Message-ID: <52504239.8090803@gmail.com> (raw)
In-Reply-To: <20131003134204.e408977b42cb85984473cfd6@linux-foundation.org>
Hello andrew,
On 10/04/2013 04:42 AM, Andrew Morton wrote:
> On Thu, 03 Oct 2013 11:32:02 +0800 Zhang Yanfei <zhangyanfei.yes@gmail.com> wrote:
>
>> We pass the number of pages which hold page structs of a memory
>> section to function free_map_bootmem. This is right when
>> !CONFIG_SPARSEMEM_VMEMMAP but wrong when CONFIG_SPARSEMEM_VMEMMAP.
>> When CONFIG_SPARSEMEM_VMEMMAP, we should pass the number of pages
>> of a memory section to free_map_bootmem.
>>
>> So the fix is removing the nr_pages parameter. When
>> CONFIG_SPARSEMEM_VMEMMAP, we directly use the prefined marco
>> PAGES_PER_SECTION in free_map_bootmem. When !CONFIG_SPARSEMEM_VMEMMAP,
>> we calculate page numbers needed to hold the page structs for a
>> memory section and use the value in free_map_bootmem.
>
> What were the runtime user-visible effects of that bug?
>
> Please always include this information when fixing a bug.
Sorry....This was found by reading the code. And I have no machine that
support memory hot-remove to test the bug now. But I believe it is a bug.
BTW, I've made a mistake in this patch which was found by wanpeng. I'll
send v2.
--
Thanks.
Zhang Yanfei
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Yanfei <zhangyanfei.yes@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Wen Congyang <wency@cn.fujitsu.com>,
Tang Chen <tangchen@cn.fujitsu.com>,
Toshi Kani <toshi.kani@hp.com>,
isimatu.yasuaki@jp.fujitsu.com, Linux MM <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
Wanpeng Li <liwanp@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] mm/sparsemem: Fix a bug in free_map_bootmem when CONFIG_SPARSEMEM_VMEMMAP
Date: Sun, 06 Oct 2013 00:45:45 +0800 [thread overview]
Message-ID: <52504239.8090803@gmail.com> (raw)
In-Reply-To: <20131003134204.e408977b42cb85984473cfd6@linux-foundation.org>
Hello andrew,
On 10/04/2013 04:42 AM, Andrew Morton wrote:
> On Thu, 03 Oct 2013 11:32:02 +0800 Zhang Yanfei <zhangyanfei.yes@gmail.com> wrote:
>
>> We pass the number of pages which hold page structs of a memory
>> section to function free_map_bootmem. This is right when
>> !CONFIG_SPARSEMEM_VMEMMAP but wrong when CONFIG_SPARSEMEM_VMEMMAP.
>> When CONFIG_SPARSEMEM_VMEMMAP, we should pass the number of pages
>> of a memory section to free_map_bootmem.
>>
>> So the fix is removing the nr_pages parameter. When
>> CONFIG_SPARSEMEM_VMEMMAP, we directly use the prefined marco
>> PAGES_PER_SECTION in free_map_bootmem. When !CONFIG_SPARSEMEM_VMEMMAP,
>> we calculate page numbers needed to hold the page structs for a
>> memory section and use the value in free_map_bootmem.
>
> What were the runtime user-visible effects of that bug?
>
> Please always include this information when fixing a bug.
Sorry....This was found by reading the code. And I have no machine that
support memory hot-remove to test the bug now. But I believe it is a bug.
BTW, I've made a mistake in this patch which was found by wanpeng. I'll
send v2.
--
Thanks.
Zhang Yanfei
next prev parent reply other threads:[~2013-10-05 16:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 3:30 [PATCH 1/2] mm/sparsemem: Use PAGES_PER_SECTION to remove redundant nr_pages parameter Zhang Yanfei
2013-10-03 3:30 ` Zhang Yanfei
2013-10-03 3:32 ` [PATCH 2/2] mm/sparsemem: Fix a bug in free_map_bootmem when CONFIG_SPARSEMEM_VMEMMAP Zhang Yanfei
2013-10-03 3:32 ` Zhang Yanfei
2013-10-03 20:42 ` Andrew Morton
2013-10-03 20:42 ` Andrew Morton
2013-10-05 16:45 ` Zhang Yanfei [this message]
2013-10-05 16:45 ` Zhang Yanfei
2013-10-05 5:54 ` Wanpeng Li
[not found] ` <524fa9a0.a5e8420a.188e.5eb1SMTPIN_ADDED_BROKEN@mx.google.com>
2013-10-05 6:52 ` Zhang Yanfei
2013-10-05 6:52 ` Zhang Yanfei
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=52504239.8090803@gmail.com \
--to=zhangyanfei.yes@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liwanp@linux.vnet.ibm.com \
--cc=tangchen@cn.fujitsu.com \
--cc=toshi.kani@hp.com \
--cc=wency@cn.fujitsu.com \
--cc=zhangyanfei@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.