From: liuj97@gmail.com (Jiang Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2, part3 02/12] mm/ARM64: kill poison_init_mem()
Date: Tue, 19 Mar 2013 01:21:50 +0800 [thread overview]
Message-ID: <51474D2E.7060709@gmail.com> (raw)
In-Reply-To: <20130317214642.GA20875@mudshark.cambridge.arm.com>
On 03/18/2013 05:46 AM, Will Deacon wrote:
> On Sat, Mar 16, 2013 at 05:03:23PM +0000, Jiang Liu wrote:
>> Use free_reserved_area() to kill poison_init_mem() on ARM64.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will.deacon@arm.com>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: linux-kernel at vger.kernel.org
>> ---
>> arch/arm64/mm/init.c | 17 +++--------------
>> 1 file changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index e58dd7f..b87bdb8 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -197,14 +197,6 @@ void __init bootmem_init(void)
>> max_pfn = max_low_pfn = max;
>> }
>>
>> -/*
>> - * Poison init memory with an undefined instruction (0x0).
>> - */
>> -static inline void poison_init_mem(void *s, size_t count)
>> -{
>> - memset(s, 0, count);
>> -}
>> -
>> #ifndef CONFIG_SPARSEMEM_VMEMMAP
>> static inline void free_memmap(unsigned long start_pfn, unsigned long end_pfn)
>> {
>> @@ -386,8 +378,7 @@ void __init mem_init(void)
>>
>> void free_initmem(void)
>> {
>> - poison_init_mem(__init_begin, __init_end - __init_begin);
>> - free_initmem_default(-1);
>> + free_initmem_default(0);
>
> This change looks unrelated to $subject. We should probably just poison with
> 0 from the outset, when free_initmem_default is introduced.
Hi Will,
As you have suggested, this patch should be merged into patchset which
introduces free_initmem_default(). I have a plan to merge it in v3, but the v2
patchset has been merged into -mm tree, so I generated another patch against the
mm tree.
free_initmem_default(-1) doesn't poison the freed memory and
free_initmem_default(0) poisons the freed memory with 0, so it's needed to
kill poison_init_mem().
regards!
Gerry
>
> Will
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <liuj97@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Jiang Liu <jiang.liu@huawei.com>,
Wen Congyang <wency@cn.fujitsu.com>, Mel Gorman <mgorman@suse.de>,
Minchan Kim <minchan@kernel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Michal Hocko <mhocko@suse.cz>, Jianguo Wu <wujianguo@huawei.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Catalin Marinas <Catalin.Marinas@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2, part3 02/12] mm/ARM64: kill poison_init_mem()
Date: Tue, 19 Mar 2013 01:21:50 +0800 [thread overview]
Message-ID: <51474D2E.7060709@gmail.com> (raw)
In-Reply-To: <20130317214642.GA20875@mudshark.cambridge.arm.com>
On 03/18/2013 05:46 AM, Will Deacon wrote:
> On Sat, Mar 16, 2013 at 05:03:23PM +0000, Jiang Liu wrote:
>> Use free_reserved_area() to kill poison_init_mem() on ARM64.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will.deacon@arm.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>> arch/arm64/mm/init.c | 17 +++--------------
>> 1 file changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index e58dd7f..b87bdb8 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -197,14 +197,6 @@ void __init bootmem_init(void)
>> max_pfn = max_low_pfn = max;
>> }
>>
>> -/*
>> - * Poison init memory with an undefined instruction (0x0).
>> - */
>> -static inline void poison_init_mem(void *s, size_t count)
>> -{
>> - memset(s, 0, count);
>> -}
>> -
>> #ifndef CONFIG_SPARSEMEM_VMEMMAP
>> static inline void free_memmap(unsigned long start_pfn, unsigned long end_pfn)
>> {
>> @@ -386,8 +378,7 @@ void __init mem_init(void)
>>
>> void free_initmem(void)
>> {
>> - poison_init_mem(__init_begin, __init_end - __init_begin);
>> - free_initmem_default(-1);
>> + free_initmem_default(0);
>
> This change looks unrelated to $subject. We should probably just poison with
> 0 from the outset, when free_initmem_default is introduced.
Hi Will,
As you have suggested, this patch should be merged into patchset which
introduces free_initmem_default(). I have a plan to merge it in v3, but the v2
patchset has been merged into -mm tree, so I generated another patch against the
mm tree.
free_initmem_default(-1) doesn't poison the freed memory and
free_initmem_default(0) poisons the freed memory with 0, so it's needed to
kill poison_init_mem().
regards!
Gerry
>
> Will
> --
> 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/
>
--
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: Jiang Liu <liuj97@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Rientjes <rientjes@google.com>,
Jiang Liu <jiang.liu@huawei.com>,
Wen Congyang <wency@cn.fujitsu.com>, Mel Gorman <mgorman@suse.de>,
Minchan Kim <minchan@kernel.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Michal Hocko <mhocko@suse.cz>, Jianguo Wu <wujianguo@huawei.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Catalin Marinas <Catalin.Marinas@arm.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2, part3 02/12] mm/ARM64: kill poison_init_mem()
Date: Tue, 19 Mar 2013 01:21:50 +0800 [thread overview]
Message-ID: <51474D2E.7060709@gmail.com> (raw)
In-Reply-To: <20130317214642.GA20875@mudshark.cambridge.arm.com>
On 03/18/2013 05:46 AM, Will Deacon wrote:
> On Sat, Mar 16, 2013 at 05:03:23PM +0000, Jiang Liu wrote:
>> Use free_reserved_area() to kill poison_init_mem() on ARM64.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will.deacon@arm.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> ---
>> arch/arm64/mm/init.c | 17 +++--------------
>> 1 file changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
>> index e58dd7f..b87bdb8 100644
>> --- a/arch/arm64/mm/init.c
>> +++ b/arch/arm64/mm/init.c
>> @@ -197,14 +197,6 @@ void __init bootmem_init(void)
>> max_pfn = max_low_pfn = max;
>> }
>>
>> -/*
>> - * Poison init memory with an undefined instruction (0x0).
>> - */
>> -static inline void poison_init_mem(void *s, size_t count)
>> -{
>> - memset(s, 0, count);
>> -}
>> -
>> #ifndef CONFIG_SPARSEMEM_VMEMMAP
>> static inline void free_memmap(unsigned long start_pfn, unsigned long end_pfn)
>> {
>> @@ -386,8 +378,7 @@ void __init mem_init(void)
>>
>> void free_initmem(void)
>> {
>> - poison_init_mem(__init_begin, __init_end - __init_begin);
>> - free_initmem_default(-1);
>> + free_initmem_default(0);
>
> This change looks unrelated to $subject. We should probably just poison with
> 0 from the outset, when free_initmem_default is introduced.
Hi Will,
As you have suggested, this patch should be merged into patchset which
introduces free_initmem_default(). I have a plan to merge it in v3, but the v2
patchset has been merged into -mm tree, so I generated another patch against the
mm tree.
free_initmem_default(-1) doesn't poison the freed memory and
free_initmem_default(0) poisons the freed memory with 0, so it's needed to
kill poison_init_mem().
regards!
Gerry
>
> Will
> --
> 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/
>
next prev parent reply other threads:[~2013-03-18 17:21 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 17:03 [PATCH v2, part3 00/12] accurately calculate zone->managed_pages Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 01/12] mm: enhance free_reserved_area() to support poisoning memory with zero Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:37 ` Geert Uytterhoeven
2013-03-16 17:37 ` Geert Uytterhoeven
2013-03-16 17:48 ` Jiang Liu
2013-03-16 17:48 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 02/12] mm/ARM64: kill poison_init_mem() Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-17 21:46 ` Will Deacon
2013-03-17 21:46 ` Will Deacon
2013-03-17 21:46 ` Will Deacon
2013-03-18 17:21 ` Jiang Liu [this message]
2013-03-18 17:21 ` Jiang Liu
2013-03-18 17:21 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 03/12] mm/x86: use common help functions to furthur simplify code Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 04/12] mm/tile: use common help functions to free reserved pages Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 05/12] mm/powertv: " Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 06/12] mm/acornfb: " Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 07/12] mm: accurately calculate zone->managed_pages for highmem zones Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 08/12] mm: use a dedicated lock to protect totalram_pages and zone->managed_pages Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 09/12] mm: avoid using __free_pages_bootmem() at runtime Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 10/12] mm: correctly update zone->mamaged_pages Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 11/12] mm: report available pages as "MemTotal" for each NUMA node Jiang Liu
2013-03-16 17:03 ` Jiang Liu
2013-03-16 17:03 ` [PATCH v2, part3 12/12] mm: concentrate adjusting of totalram_pages Jiang Liu
2013-03-16 17:03 ` Jiang Liu
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=51474D2E.7060709@gmail.com \
--to=liuj97@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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.