Re: [PATCH] mm/hotplug: prevent memory leak when reuse pgdat

2019-08-13 Thread Wei Yang
On Tue, Aug 13, 2019 at 09:57:07AM +0200, Michal Hocko wrote: >On Tue 13-08-19 10:06:08, Wei Yang wrote: >> When offline a node in try_offline_node, pgdat is not released. So that >> pgdat could be reused in hotadd_new_pgdat. While we re-allocate >> pgdat->per_cpu_nodestats if this pgdat is reused.

Re: [PATCH] mm/hotplug: prevent memory leak when reuse pgdat

2019-08-13 Thread Michal Hocko
On Tue 13-08-19 10:06:08, Wei Yang wrote: > When offline a node in try_offline_node, pgdat is not released. So that > pgdat could be reused in hotadd_new_pgdat. While we re-allocate > pgdat->per_cpu_nodestats if this pgdat is reused. > > This patch prevents the memory leak by just allocate per_cpu

[PATCH] mm/hotplug: prevent memory leak when reuse pgdat

2019-08-12 Thread Wei Yang
When offline a node in try_offline_node, pgdat is not released. So that pgdat could be reused in hotadd_new_pgdat. While we re-allocate pgdat->per_cpu_nodestats if this pgdat is reused. This patch prevents the memory leak by just allocate per_cpu_nodestats when it is a new pgdat. NOTE: This is no