All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	Seth Jennings <sjenning@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] zram: clean up handle
Date: Thu, 07 Jun 2012 11:46:22 +0900	[thread overview]
Message-ID: <4FD015FE.7070906@kernel.org> (raw)
In-Reply-To: <4FCEE4E0.6030707@vflare.org>

On 06/06/2012 02:04 PM, Nitin Gupta wrote:

> On 06/05/2012 12:23 AM, Minchan Kim wrote:
> 
>> zram's handle variable can store handle of zsmalloc in case of
>> compressing efficiently. Otherwise, it stores point of page descriptor.
>> This patch clean up the mess by union struct.
>>
>> changelog
>>   * from v1
>> 	- none(new add in v2)
>>
>> Cc: Nitin Gupta <ngupta@vflare.org>
>> Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
>> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Signed-off-by: Minchan Kim <minchan@kernel.org>
>> ---
>>  drivers/staging/zram/zram_drv.c |   77 ++++++++++++++++++++-------------------
>>  drivers/staging/zram/zram_drv.h |    5 ++-
>>  2 files changed, 44 insertions(+), 38 deletions(-)
>>
> 
> 
> I think page vs handle distinction was added since xvmalloc could not
> handle full page allocation. Now that zsmalloc allows full page


I see. I didn't know that because I'm blind on xvmalloc.

> allocation, we can just use it for both cases. This would also allow
> removing the ZRAM_UNCOMPRESSED flag. The only downside will be slightly
> slower code path for full page allocation but this event is anyways
> supposed to be rare, so should be fine.


Fair enough.
It can remove many code of zram.
Okay. Will look into that.

Thanks.

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	Seth Jennings <sjenning@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/2] zram: clean up handle
Date: Thu, 07 Jun 2012 11:46:22 +0900	[thread overview]
Message-ID: <4FD015FE.7070906@kernel.org> (raw)
In-Reply-To: <4FCEE4E0.6030707@vflare.org>

On 06/06/2012 02:04 PM, Nitin Gupta wrote:

> On 06/05/2012 12:23 AM, Minchan Kim wrote:
> 
>> zram's handle variable can store handle of zsmalloc in case of
>> compressing efficiently. Otherwise, it stores point of page descriptor.
>> This patch clean up the mess by union struct.
>>
>> changelog
>>   * from v1
>> 	- none(new add in v2)
>>
>> Cc: Nitin Gupta <ngupta@vflare.org>
>> Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
>> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Signed-off-by: Minchan Kim <minchan@kernel.org>
>> ---
>>  drivers/staging/zram/zram_drv.c |   77 ++++++++++++++++++++-------------------
>>  drivers/staging/zram/zram_drv.h |    5 ++-
>>  2 files changed, 44 insertions(+), 38 deletions(-)
>>
> 
> 
> I think page vs handle distinction was added since xvmalloc could not
> handle full page allocation. Now that zsmalloc allows full page


I see. I didn't know that because I'm blind on xvmalloc.

> allocation, we can just use it for both cases. This would also allow
> removing the ZRAM_UNCOMPRESSED flag. The only downside will be slightly
> slower code path for full page allocation but this event is anyways
> supposed to be rare, so should be fine.


Fair enough.
It can remove many code of zram.
Okay. Will look into that.

Thanks.

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2012-06-07  2:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05  7:23 [PATCH 1/2] zsmalloc: zsmalloc: use unsigned long instead of void * Minchan Kim
2012-06-05  7:23 ` Minchan Kim
2012-06-05  7:23 ` [PATCH 2/2] zram: clean up handle Minchan Kim
2012-06-05  7:23   ` Minchan Kim
2012-06-06  5:04   ` Nitin Gupta
2012-06-06  5:04     ` Nitin Gupta
2012-06-07  2:46     ` Minchan Kim [this message]
2012-06-07  2:46       ` Minchan Kim
2012-06-07 20:47       ` Dan Magenheimer
2012-06-07 20:47         ` Dan Magenheimer
2012-06-07 21:16         ` Nitin Gupta
2012-06-07 21:16           ` Nitin Gupta
2012-06-07 21:20           ` Dan Magenheimer
2012-06-07 21:20             ` Dan Magenheimer
2012-06-06  4:00 ` [PATCH 1/2] zsmalloc: zsmalloc: use unsigned long instead of void * Nitin Gupta
2012-06-06  4:00   ` Nitin Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD015FE.7070906@kernel.org \
    --to=minchan@kernel.org \
    --cc=dan.magenheimer@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=sjenning@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.