From: Minchan Kim <minchan@kernel.org>
To: <js1304@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
<linux-kernel@vger.kernel.org>, <kernel-team@lge.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v3 3/4] zram: make deduplication feature optional
Date: Tue, 25 Apr 2017 15:51:20 +0900 [thread overview]
Message-ID: <20170425065120.GA6578@bbox> (raw)
In-Reply-To: <1492737291-11455-4-git-send-email-iamjoonsoo.kim@lge.com>
On Fri, Apr 21, 2017 at 10:14:50AM +0900, js1304@gmail.com wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Benefit of deduplication is dependent on the workload so it's not
> preferable to always enable. Therefore, make it optional in Kconfig
> and device param. Default is 'off'. This option will be beneficial
> for users who use the zram as blockdev and stores build output to it.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
< snip >
>
> static struct attribute *zram_disk_attrs[] = {
> &dev_attr_disksize.attr,
> @@ -1169,6 +1227,7 @@ static struct attribute *zram_disk_attrs[] = {
> &dev_attr_mem_used_max.attr,
> &dev_attr_max_comp_streams.attr,
> &dev_attr_comp_algorithm.attr,
> + &dev_attr_use_dedup.attr,
> &dev_attr_io_stat.attr,
> &dev_attr_mm_stat.attr,
> &dev_attr_debug_stat.attr,
> diff --git a/drivers/block/zram/zram_drv.h b/drivers/block/zram/zram_drv.h
> index 4b86921..3f7649a 100644
> --- a/drivers/block/zram/zram_drv.h
> +++ b/drivers/block/zram/zram_drv.h
> @@ -134,7 +134,12 @@ struct zram {
> * zram is claimed so open request will be failed
> */
> bool claim; /* Protected by bdev->bd_mutex */
> + bool use_dedup;
> };
>
> +static inline bool zram_dedup_enabled(struct zram *zram)
> +{
> + return zram->use_dedup;
#ifdef CONFIG_ZRAM_DEDUP
return zram->use_dedup;
#else
return false;
#endif
Otherwise, looks good to me.
next prev parent reply other threads:[~2017-04-25 6:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 1:14 [PATCH v3 0/4] zram: implement deduplication in zram js1304
2017-04-21 1:14 ` [PATCH v3 1/4] zram: introduce zram_entry to prepare dedup functionality js1304
2017-04-21 1:14 ` [PATCH v3 2/4] zram: implement deduplication in zram js1304
2017-04-21 1:14 ` [PATCH v3 3/4] zram: make deduplication feature optional js1304
2017-04-25 6:51 ` Minchan Kim [this message]
2017-04-25 8:13 ` Joonsoo Kim
2017-04-25 10:24 ` Sergey Senozhatsky
2017-04-26 0:53 ` Joonsoo Kim
2017-04-21 1:14 ` [PATCH v3 4/4] zram: compare all the entries with same checksum for deduplication js1304
2017-04-25 6:53 ` [PATCH v3 0/4] zram: implement deduplication in zram Minchan Kim
2017-04-25 8:15 ` Joonsoo Kim
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=20170425065120.GA6578@bbox \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=kernel-team@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sergey.senozhatsky@gmail.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.