Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-05 Thread Yu Zhao
On Fri, Dec 02, 2016 at 02:46:06PM +0100, Michal Hocko wrote: > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > > __unregister_cpu_notifier() only removes registered notifier from its > > linked list when CPU hotplug is configured. If we free registered CPU > > notifier when HOTPLUG_CPU=n, we corrupt

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-05 Thread Yu Zhao
On Fri, Dec 02, 2016 at 02:46:06PM +0100, Michal Hocko wrote: > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > > __unregister_cpu_notifier() only removes registered notifier from its > > linked list when CPU hotplug is configured. If we free registered CPU > > notifier when HOTPLUG_CPU=n, we corrupt

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Dan Streetman
On Fri, Dec 2, 2016 at 9:44 AM, Michal Hocko wrote: > On Fri 02-12-16 15:38:48, Michal Hocko wrote: >> On Fri 02-12-16 09:24:35, Dan Streetman wrote: >> > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: >> > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: >>

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Dan Streetman
On Fri, Dec 2, 2016 at 9:44 AM, Michal Hocko wrote: > On Fri 02-12-16 15:38:48, Michal Hocko wrote: >> On Fri 02-12-16 09:24:35, Dan Streetman wrote: >> > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: >> > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: >> > >> __unregister_cpu_notifier() only

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Fri 02-12-16 15:38:48, Michal Hocko wrote: > On Fri 02-12-16 09:24:35, Dan Streetman wrote: > > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > > >> __unregister_cpu_notifier() only removes registered notifier from its > >

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Fri 02-12-16 15:38:48, Michal Hocko wrote: > On Fri 02-12-16 09:24:35, Dan Streetman wrote: > > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > > >> __unregister_cpu_notifier() only removes registered notifier from its > > >> linked list

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Dan Streetman
On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > On Wed 30-11-16 13:15:16, Yu Zhao wrote: >> __unregister_cpu_notifier() only removes registered notifier from its >> linked list when CPU hotplug is configured. If we free registered CPU >> notifier when HOTPLUG_CPU=n, we

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Dan Streetman
On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > On Wed 30-11-16 13:15:16, Yu Zhao wrote: >> __unregister_cpu_notifier() only removes registered notifier from its >> linked list when CPU hotplug is configured. If we free registered CPU >> notifier when HOTPLUG_CPU=n, we corrupt the linked

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Fri 02-12-16 09:24:35, Dan Streetman wrote: > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > >> __unregister_cpu_notifier() only removes registered notifier from its > >> linked list when CPU hotplug is configured. If we

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Fri 02-12-16 09:24:35, Dan Streetman wrote: > On Fri, Dec 2, 2016 at 8:46 AM, Michal Hocko wrote: > > On Wed 30-11-16 13:15:16, Yu Zhao wrote: > >> __unregister_cpu_notifier() only removes registered notifier from its > >> linked list when CPU hotplug is configured. If we free registered CPU >

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Wed 30-11-16 13:15:16, Yu Zhao wrote: > __unregister_cpu_notifier() only removes registered notifier from its > linked list when CPU hotplug is configured. If we free registered CPU > notifier when HOTPLUG_CPU=n, we corrupt the linked list. > > To fix the problem, we can either use a static

Re: [PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-12-02 Thread Michal Hocko
On Wed 30-11-16 13:15:16, Yu Zhao wrote: > __unregister_cpu_notifier() only removes registered notifier from its > linked list when CPU hotplug is configured. If we free registered CPU > notifier when HOTPLUG_CPU=n, we corrupt the linked list. > > To fix the problem, we can either use a static

[PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-11-30 Thread Yu Zhao
__unregister_cpu_notifier() only removes registered notifier from its linked list when CPU hotplug is configured. If we free registered CPU notifier when HOTPLUG_CPU=n, we corrupt the linked list. To fix the problem, we can either use a static CPU notifier that walks through each pool or just

[PATCH v2] zswap: only use CPU notifier when HOTPLUG_CPU=y

2016-11-30 Thread Yu Zhao
__unregister_cpu_notifier() only removes registered notifier from its linked list when CPU hotplug is configured. If we free registered CPU notifier when HOTPLUG_CPU=n, we corrupt the linked list. To fix the problem, we can either use a static CPU notifier that walks through each pool or just