Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-11 Thread Weijie Yang
On Fri, Oct 11, 2013 at 5:25 PM, Krzysztof Kozlowski wrote: > On Fri, 2013-10-11 at 10:23 +0800, Weijie Yang wrote: >> I am sorry to interrupt this topic, but I found an tiny issue near that: >> >> we can not "set_blocksize(bdev, p->old_block_size);" at the end of swapoff() >> because swap_info p

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-11 Thread Krzysztof Kozlowski
On Fri, 2013-10-11 at 10:23 +0800, Weijie Yang wrote: > I am sorry to interrupt this topic, but I found an tiny issue near that: > > we can not "set_blocksize(bdev, p->old_block_size);" at the end of swapoff() > because swap_info p may be reused by concurrent swapon called > I think we need to sa

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-10 Thread Weijie Yang
Thanks, Seth On Thu, Oct 10, 2013 at 10:26 AM, Seth Jennings wrote: > On Thu, Oct 10, 2013 at 09:29:07AM +0800, Bob Liu wrote: >> On 10/09/2013 10:40 PM, Seth Jennings wrote: >> > >> > The reason we never noticed this for zswap is that zswap has no >> > dynamically allocated per-type resources.

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-09 Thread Seth Jennings
On Thu, Oct 10, 2013 at 09:29:07AM +0800, Bob Liu wrote: > On 10/09/2013 10:40 PM, Seth Jennings wrote: > > > > The reason we never noticed this for zswap is that zswap has no > > dynamically allocated per-type resources. In the expected case, > > where all of the pages have been drained from zsw

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-09 Thread Bob Liu
On 10/09/2013 10:40 PM, Seth Jennings wrote: > On Tue, Oct 08, 2013 at 01:08:53PM -0700, Andrew Morton wrote: >> On Tue, 08 Oct 2013 10:13:20 +0200 Krzysztof Kozlowski >> wrote: >> >>> On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote: On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlo

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-09 Thread Seth Jennings
On Tue, Oct 08, 2013 at 01:08:53PM -0700, Andrew Morton wrote: > On Tue, 08 Oct 2013 10:13:20 +0200 Krzysztof Kozlowski > wrote: > > > On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote: > > > On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski > > > wrote: > > > > > > > During swapoff

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-09 Thread Bob Liu
On 10/09/2013 04:08 AM, Andrew Morton wrote: > On Tue, 08 Oct 2013 10:13:20 +0200 Krzysztof Kozlowski > wrote: > >> On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote: >>> On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski >>> wrote: >>> During swapoff the frontswap_map was NULL-

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-08 Thread Andrew Morton
On Tue, 08 Oct 2013 10:13:20 +0200 Krzysztof Kozlowski wrote: > On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote: > > On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski > > wrote: > > > > > During swapoff the frontswap_map was NULL-ified before calling > > > frontswap_invalidate_are

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-08 Thread Krzysztof Kozlowski
On pon, 2013-10-07 at 15:03 -0700, Andrew Morton wrote: > On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski > wrote: > > > During swapoff the frontswap_map was NULL-ified before calling > > frontswap_invalidate_area(). However the frontswap_invalidate_area() > > exits early if frontswap_map

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-07 Thread Andrew Morton
On Mon, 07 Oct 2013 17:25:41 +0200 Krzysztof Kozlowski wrote: > During swapoff the frontswap_map was NULL-ified before calling > frontswap_invalidate_area(). However the frontswap_invalidate_area() > exits early if frontswap_map is NULL. Invalidate was never called during > swapoff. > > This pa

Re: [PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-07 Thread Seth Jennings
On Mon, Oct 07, 2013 at 05:25:41PM +0200, Krzysztof Kozlowski wrote: > During swapoff the frontswap_map was NULL-ified before calling > frontswap_invalidate_area(). However the frontswap_invalidate_area() > exits early if frontswap_map is NULL. Invalidate was never called during > swapoff. > > Thi

[PATCH] frontswap: enable call to invalidate area on swapoff

2013-10-07 Thread Krzysztof Kozlowski
During swapoff the frontswap_map was NULL-ified before calling frontswap_invalidate_area(). However the frontswap_invalidate_area() exits early if frontswap_map is NULL. Invalidate was never called during swapoff. This patch moves frontswap_map_set() in swapoff just after calling frontswap_invalid