RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > Hi Seth, > > On Tue, Apr 09, 2013 at 03:52:36PM -0500, Seth Jennings wrote: > > On 04/08/2013 08:36 PM, Minchan Kim

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > On Tue, Apr 09, 2013 at 01:37:47PM -0700, Dan Magenheimer wrote: > > > From: Minchan Kim [mailto:minc...@kernel.org] >

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: > > > From: Minchan Kim [mailto:minc...@kernel.org] >

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
> From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > On 04/08/2013 08:36 PM, Minchan Kim wrote: > > On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: > >

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
From: Seth Jennings [mailto:sjenn...@linux.vnet.ibm.com] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) On 04/08/2013 08:36 PM, Minchan Kim wrote: On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: Hi Dan, On Mon, Apr 08, 2013

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) On Tue, Apr 09, 2013 at 01:37:47PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-11 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Seth, On Tue, Apr 09, 2013 at 03:52:36PM -0500, Seth Jennings wrote: On 04/08/2013 08:36 PM, Minchan Kim wrote: On Tue, Apr 09, 2013 at 10:27

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Minchan, On 04/10/2013 08:50 AM, Minchan Kim wrote: On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Dan, On 04/10/2013 04:25 AM, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
imer wrote: > >>>> From: Minchan Kim [mailto:minc...@kernel.org] > >>>> Sent: Monday, April 08, 2013 12:01 AM > >>>> Subject: [PATCH] mm: remove compressed copy from zram in-memory > >>> > >>> (patch removed) > >>&g

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:37:47PM -0700, Dan Magenheimer wrote: > > From: Minchan Kim [mailto:minc...@kernel.org] > > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > > zram in-memory) > > > > On Tue, Apr 09, 2013 at 10:27:19AM +0900, M

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: > > From: Minchan Kim [mailto:minc...@kernel.org] > > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > > zram in-memory) > > > > Hi Dan, > > > > On Mon, Apr 08,

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 12:54:23PM -0700, Andrew Morton wrote: > On Tue, 9 Apr 2013 10:02:31 +0900 Minchan Kim wrote: > > > > Also, what's up with the SWP_BLKDEV test? zram doesn't support > > > SWP_FILE? Why on earth not? > > > > > > Putting swap_slot_free_notify() into

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:36:52PM +0800, Ric Mason wrote: > Hi Minchan, > On 04/09/2013 09:02 AM, Minchan Kim wrote: > >Hi Andrew, > > > >On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: > >>On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim wrote: > >> > >>>Swap subsystem does lazy

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Seth Jennings
Monday, April 08, 2013 12:01 AM >>>> Subject: [PATCH] mm: remove compressed copy from zram in-memory >>> >>> (patch removed) >>> >>>> Fragment ratio is almost same but memory consumption and compile time >>>> is better. I am working to

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: > > Hi Dan, > > > > On Mon, Apr 08, 2013 at 09:32:

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from > zram in-memory) > > Hi Dan, > > On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: > > > From: Minchan Kim [mailto:minc...@

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Andrew Morton
On Tue, 9 Apr 2013 10:02:31 +0900 Minchan Kim wrote: > > Also, what's up with the SWP_BLKDEV test? zram doesn't support > > SWP_FILE? Why on earth not? > > > > Putting swap_slot_free_notify() into block_device_operations seems > > rather wrong. It precludes zram-over-swapfiles for all time

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Andrew Morton
On Tue, 9 Apr 2013 10:02:31 +0900 Minchan Kim minc...@kernel.org wrote: Also, what's up with the SWP_BLKDEV test? zram doesn't support SWP_FILE? Why on earth not? Putting swap_slot_free_notify() into block_device_operations seems rather wrong. It precludes zram-over-swapfiles for

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Sent: Monday, April 08

RE: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Seth Jennings
compressed copy from zram in-memory (patch removed) Fragment ratio is almost same but memory consumption and compile time is better. I am working to add defragment function of zsmalloc. Hi Minchan -- I would be very interested in your design thoughts on how you plan to add defragmentation

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:36:52PM +0800, Ric Mason wrote: Hi Minchan, On 04/09/2013 09:02 AM, Minchan Kim wrote: Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim minc...@kernel.org wrote: Swap subsystem does lazy

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 12:54:23PM -0700, Andrew Morton wrote: On Tue, 9 Apr 2013 10:02:31 +0900 Minchan Kim minc...@kernel.org wrote: Also, what's up with the SWP_BLKDEV test? zram doesn't support SWP_FILE? Why on earth not? Putting swap_slot_free_notify() into

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
On Tue, Apr 09, 2013 at 01:37:47PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: Hi Dan, On Mon

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Minchan Kim
...@kernel.org] Sent: Monday, April 08, 2013 12:01 AM Subject: [PATCH] mm: remove compressed copy from zram in-memory (patch removed) Fragment ratio is almost same but memory consumption and compile time is better. I am working to add defragment function of zsmalloc. Hi Minchan -- I

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Dan, On 04/10/2013 04:25 AM, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-09 Thread Ric Mason
Hi Minchan, On 04/10/2013 08:50 AM, Minchan Kim wrote: On Tue, Apr 09, 2013 at 01:25:45PM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Subject: Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory) Hi Dan, On Mon, Apr 08, 2013 at 09

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Ric Mason
Hi Minchan, On 04/09/2013 09:02 AM, Minchan Kim wrote: Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Minchan Kim
On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: > Hi Dan, > > On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: > > > From: Minchan Kim [mailto:minc...@kernel.org] > > > Sent: Monday, April 08, 2013 12:01 AM > > > Subject: [PATCH]

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Minchan Kim
Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: > > From: Minchan Kim [mailto:minc...@kernel.org] > > Sent: Monday, April 08, 2013 12:01 AM > > Subject: [PATCH] mm: remove compressed copy from zram in-memory > > (patch removed) > > &

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Minchan Kim
Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: > On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim wrote: > > > Swap subsystem does lazy swap slot free with expecting the page > > would be swapped out again so we can avoid unnecessary write. > > Is that correct? How

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Andrew Morton
On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim wrote: > Swap subsystem does lazy swap slot free with expecting the page > would be swapped out again so we can avoid unnecessary write. Is that correct? How can it save a write? > But the problem in in-memory swap(ex, zram) is that it consumes >

zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Dan Magenheimer
> From: Minchan Kim [mailto:minc...@kernel.org] > Sent: Monday, April 08, 2013 12:01 AM > Subject: [PATCH] mm: remove compressed copy from zram in-memory (patch removed) > Fragment ratio is almost same but memory consumption and compile time > is better. I am working to add defr

[PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Minchan Kim
Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid unnecessary write. But the problem in in-memory swap(ex, zram) is that it consumes memory space until vm_swap_full(ie, used half of all of swap device) condition meet. It could be bad if we

[PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Minchan Kim
Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid unnecessary write. But the problem in in-memory swap(ex, zram) is that it consumes memory space until vm_swap_full(ie, used half of all of swap device) condition meet. It could be bad if we

zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Dan Magenheimer
From: Minchan Kim [mailto:minc...@kernel.org] Sent: Monday, April 08, 2013 12:01 AM Subject: [PATCH] mm: remove compressed copy from zram in-memory (patch removed) Fragment ratio is almost same but memory consumption and compile time is better. I am working to add defragment function

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Andrew Morton
On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim minc...@kernel.org wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid unnecessary write. Is that correct? How can it save a write? But the problem in in-memory swap(ex, zram) is

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Minchan Kim
Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim minc...@kernel.org wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again so we can avoid unnecessary write. Is that

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Minchan Kim
Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Sent: Monday, April 08, 2013 12:01 AM Subject: [PATCH] mm: remove compressed copy from zram in-memory (patch removed) Fragment ratio is almost same but memory

Re: zsmalloc defrag (Was: [PATCH] mm: remove compressed copy from zram in-memory)

2013-04-08 Thread Minchan Kim
On Tue, Apr 09, 2013 at 10:27:19AM +0900, Minchan Kim wrote: Hi Dan, On Mon, Apr 08, 2013 at 09:32:38AM -0700, Dan Magenheimer wrote: From: Minchan Kim [mailto:minc...@kernel.org] Sent: Monday, April 08, 2013 12:01 AM Subject: [PATCH] mm: remove compressed copy from zram in-memory

Re: [PATCH] mm: remove compressed copy from zram in-memory

2013-04-08 Thread Ric Mason
Hi Minchan, On 04/09/2013 09:02 AM, Minchan Kim wrote: Hi Andrew, On Mon, Apr 08, 2013 at 02:17:10PM -0700, Andrew Morton wrote: On Mon, 8 Apr 2013 15:01:02 +0900 Minchan Kim minc...@kernel.org wrote: Swap subsystem does lazy swap slot free with expecting the page would be swapped out again