[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2015 18:20:19 +0800
From: Gu Zheng <guz.fnst@...fujitsu.com>
To: Xishi Qiu <qiuxishi@...wei.com>
CC: Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Tang Chen <tangchen@...fujitsu.com>,
Yinghai Lu <yinghai@...nel.org>, Linux MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Toshi Kani <toshi.kani@...com>, Mel Gorman <mgorman@...e.de>,
Tejun Heo <tj@...nel.org>
Subject: Re: node-hotplug: is memset 0 safe in try_offline_node()?
Hi Xishi,
On 03/03/2015 11:30 AM, Xishi Qiu wrote:
> When hot-remove a numa node, we will clear pgdat,
> but is memset 0 safe in try_offline_node()?
It is not safe here. In fact, this is a temporary solution here.
As you know, pgdat is accessed lock-less now, so protection
mechanism (RCU?) is needed to make it completely safe here,
but it seems a bit over-kill.
>
> process A: offline node XX:
> for_each_populated_zone()
> find online node XX
> cond_resched()
> offline cpu and memory, then try_offline_node()
> node_set_offline(nid), and memset(pgdat, 0, sizeof(*pgdat))
> access node XX's pgdat
> NULL pointer access error
It's possible, but I did not meet this condition, did you?
Regards,
Gu
>
> Thanks,
> Xishi Qiu
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>
>
--
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