From: Jianguo Wu <wujianguo@huawei.com>
To: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Wen Congyang <wency@cn.fujitsu.com>,
Liujiang <jiang.liu@huawei.com>, qiuxishi <qiuxishi@huawei.com>,
linux-mm@kvack.org
Subject: Re: [PATCH] mm/hotplug: only free wait_table if it's allocated by vmalloc
Date: Mon, 25 Mar 2013 09:26:44 +0800 [thread overview]
Message-ID: <514FA7D4.8090906@huawei.com> (raw)
In-Reply-To: <514C2C36.3060709@cn.fujitsu.com>
On 2013/3/22 18:02, Tang Chen wrote:
> On 03/22/2013 05:54 PM, Jianguo Wu wrote:
>> zone->wait_table may be allocated from bootmem, it can not be freed.
>>
>> Cc: Andrew Morton<akpm@linux-foundation.org>
>> Cc: Wen Congyang<wency@cn.fujitsu.com>
>> Cc: Tang Chen<tangchen@cn.fujitsu.com>
>> Cc: Jiang Liu<jiang.liu@huawei.com>
>> Cc: linux-mm@kvack.org
>> Signed-off-by: Jianguo Wu<wujianguo@huawei.com>
>> ---
>> mm/memory_hotplug.c | 6 +++++-
>> 1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
>> index 07b6263..91ed7cd 100644
>> --- a/mm/memory_hotplug.c
>> +++ b/mm/memory_hotplug.c
>> @@ -1779,7 +1779,11 @@ void try_offline_node(int nid)
>> for (i = 0; i< MAX_NR_ZONES; i++) {
>> struct zone *zone = pgdat->node_zones + i;
>>
>> - if (zone->wait_table)
>> + /*
>> + * wait_table may be allocated from boot memory,
>> + * here only free if it's allocated by vmalloc.
>> + */
>> + if (is_vmalloc_addr(zone->wait_table))
>> vfree(zone->wait_table);
>
> Reviewed-by: Tang Chen <tangchen@cn.fujitsu.com>
>
> FYI, I'm trying add a flag member into memblock to mark memory whose
> life cycle is the same as a node. I think maybe this flag could be used
> to free this kind of memory from bootmem.
And only the bootmem is aligned to PAGE_SIZE, I think.
>
> Thanks. :)
>
>
>> }
>>
>
> --
> 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>
>
>
--
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>
prev parent reply other threads:[~2013-03-25 1:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 9:54 [PATCH] mm/hotplug: only free wait_table if it's allocated by vmalloc Jianguo Wu
2013-03-22 10:02 ` Tang Chen
2013-03-25 1:15 ` Jiang Liu
2013-03-25 3:20 ` Tang Chen
2013-03-25 1:26 ` Jianguo Wu [this message]
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=514FA7D4.8090906@huawei.com \
--to=wujianguo@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=jiang.liu@huawei.com \
--cc=linux-mm@kvack.org \
--cc=qiuxishi@huawei.com \
--cc=tangchen@cn.fujitsu.com \
--cc=wency@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).