From: Nitin Gupta <ngupta@vflare.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Seth Jennings <sjenning@linux.vnet.ibm.com>
Subject: Re: [PATCH] zram: remove special handle of uncompressed page
Date: Fri, 08 Jun 2012 00:29:44 -0700 [thread overview]
Message-ID: <4FD1A9E8.9060608@vflare.org> (raw)
In-Reply-To: <1339137567-29656-3-git-send-email-minchan@kernel.org>
On 06/07/2012 11:39 PM, Minchan Kim wrote:
> xvmalloc can't handle PAGE_SIZE page so that zram have to
> handle it specially but zsmalloc can do it so let's remove
> unnecessary special handling code.
>
> Quote from Nitin
> "I think page vs handle distinction was added since xvmalloc could not
> handle full page allocation. Now that zsmalloc allows full page
> 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."
>
> 1. This patch reduces code very much.
>
> drivers/staging/zram/zram_drv.c | 104 +++++--------------------------------
> drivers/staging/zram/zram_drv.h | 17 +-----
> drivers/staging/zram/zram_sysfs.c | 6 +--
> 3 files changed, 15 insertions(+), 112 deletions(-)
>
> 2. change pages_expand with bad_compress so it can count
> bad compression(above 75%) ratio.
>
> 3. remove zobj_header which is for back-reference for defragmentation
> because firstly, it's not used at the moment and zsmalloc can't handle
> bigger size than PAGE_SIZE so zram can't do it any more without redesign.
>
> Cc: Nitin Gupta <ngupta@vflare.org>
> Cc: Seth Jennings <sjenning@linux.vnet.ibm.com>
> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
> drivers/staging/zram/zram_drv.c | 104 +++++--------------------------------
> drivers/staging/zram/zram_drv.h | 17 +-----
> drivers/staging/zram/zram_sysfs.c | 6 +--
> 3 files changed, 15 insertions(+), 112 deletions(-)
>
I tried hard to figure out if these three things could be separated out
as separate patches but looks like that would make individual patches
unnecessarily messy.
Perhaps we should also add a fastpath for PAGE_SIZE'd objects in
zsmalloc but that's probably something for future work.
Acked-by: Nitin Gupta <ngupta@vflare.org>
Thanks,
Nitin
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-06-08 7:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 6:39 [PATCH v3] zsmalloc: zsmalloc: use unsigned long instead of void * Minchan Kim
2012-06-08 6:39 ` [PATCH] zram: fix random data read Minchan Kim
2012-06-08 7:23 ` Nitin Gupta
2012-06-08 6:39 ` [PATCH] zram: remove special handle of uncompressed page Minchan Kim
2012-06-08 7:29 ` Nitin Gupta [this message]
2012-06-08 7:13 ` [PATCH v3] zsmalloc: zsmalloc: use unsigned long instead of void * 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=4FD1A9E8.9060608@vflare.org \
--to=ngupta@vflare.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox