Re: [PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-09 Thread Seth Jennings
On Fri, Sep 06, 2013 at 01:16:45PM +0800, Weijie Yang wrote: > Consider the following scenario: > thread 0: reclaim entry x (get refcount, but not call > zswap_get_swap_cache_page) > thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. > finished, entry x and its zbud is

Re: [PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-09 Thread Seth Jennings
On Fri, Sep 06, 2013 at 01:16:45PM +0800, Weijie Yang wrote: Consider the following scenario: thread 0: reclaim entry x (get refcount, but not call zswap_get_swap_cache_page) thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. finished, entry x and its zbud is not

Re: [PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-06 Thread Bob Liu
On 09/06/2013 01:16 PM, Weijie Yang wrote: > Consider the following scenario: > thread 0: reclaim entry x (get refcount, but not call > zswap_get_swap_cache_page) > thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. > finished, entry x and its zbud is not freed as its

Re: [PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-06 Thread Bob Liu
On 09/06/2013 01:16 PM, Weijie Yang wrote: Consider the following scenario: thread 0: reclaim entry x (get refcount, but not call zswap_get_swap_cache_page) thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. finished, entry x and its zbud is not freed as its

[PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-05 Thread Weijie Yang
Consider the following scenario: thread 0: reclaim entry x (get refcount, but not call zswap_get_swap_cache_page) thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. finished, entry x and its zbud is not freed as its refcount != 0 now, the swap_map[x] = 0 thread

[PATCH v2 2/4] mm/zswap: bugfix: memory leak when invalidate and reclaim occur concurrently

2013-09-05 Thread Weijie Yang
Consider the following scenario: thread 0: reclaim entry x (get refcount, but not call zswap_get_swap_cache_page) thread 1: call zswap_frontswap_invalidate_page to invalidate entry x. finished, entry x and its zbud is not freed as its refcount != 0 now, the swap_map[x] = 0 thread