All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: ddstreet@ieee.org, gunho.lee@lge.com, iamjoonsoo.kim@lge.com,
	jmarchan@redhat.com, juno.choi@lge.com, mel@csn.ul.ie,
	ngupta@vflare.org, semenzato@google.com,
	sergey.senozhatsky@gmail.com, sjennings@variantweb.net,
	mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: + zram-support-compaction.patch added to -mm tree
Date: Thu, 5 Mar 2015 09:30:52 +0900	[thread overview]
Message-ID: <20150305003052.GA2592@blaptop> (raw)
In-Reply-To: <20150305001845.GB14927@swordfish>

Hello Sergey,

On Thu, Mar 05, 2015 at 09:18:45AM +0900, Sergey Senozhatsky wrote:
> Hello,
> 
> On (03/04/15 14:02), akpm@linux-foundation.org wrote:
> [..]
> > +++ a/drivers/block/zram/zram_drv.c
> > @@ -70,6 +70,27 @@ static inline struct zram *dev_to_zram(s
> >  	return (struct zram *)dev_to_disk(dev)->private_data;
> >  }
> >  
> > +static ssize_t compact_store(struct device *dev,
> > +		struct device_attribute *attr, const char *buf, size_t len)
> > +{
> > +	unsigned long nr_migrated;
> > +	struct zram *zram = dev_to_zram(dev);
> > +	struct zram_meta *meta;
> > +
> > +	down_read(&zram->init_lock);
> > +	if (!init_done(zram)) {
> > +		up_read(&zram->init_lock);
> > +		return -EINVAL;
> > +	}
> > +
> > +	meta = zram->meta;
> > +	nr_migrated = zs_compact(meta->mem_pool);
> > +	atomic64_add(nr_migrated, &zram->stats.num_migrated);
> > +	up_read(&zram->init_lock);
> > +
> > +	return len;
> > +}
> > +
> >  /* flag operations require table entry bit_spin_lock() being held */
> >  static int zram_test_flag(struct zram_meta *meta, u32 index,
> >  			enum zram_pageflags flag)
> 
> 
> let's stick to "helpers, attrs show/store, mm (meta, page), IO, zram control"
> function layout.
> 
> so can we please put compact_store() after, say,
> 	354 static ssize_t comp_algorithm_store(...)
> 
> function?

I will clean it up after Andrew releases new mmotm. :)

Thanks for the review!

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2015-03-05  0:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 22:02 + zram-support-compaction.patch added to -mm tree akpm
2015-03-05  0:18 ` Sergey Senozhatsky
2015-03-05  0:30   ` Minchan Kim [this message]
2015-03-05  5:29 ` Sergey Senozhatsky
2015-03-05 11:43   ` Sergey Senozhatsky
2015-03-09  0:49   ` Minchan Kim
2015-03-09  0:57     ` Sergey Senozhatsky
2015-03-09  1:05       ` Minchan Kim
2015-03-09  1:27         ` Sergey Senozhatsky
2015-03-09  1:47           ` Minchan Kim
2015-03-09  2:07             ` Sergey Senozhatsky
2015-03-09  2:21               ` Minchan Kim
2015-03-09  6:48                 ` Sergey Senozhatsky
2015-03-09 14:56                   ` Minchan Kim
2015-03-10  5:37                     ` Sergey Senozhatsky

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=20150305003052.GA2592@blaptop \
    --to=minchan@kernel.org \
    --cc=ddstreet@ieee.org \
    --cc=gunho.lee@lge.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jmarchan@redhat.com \
    --cc=juno.choi@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mel@csn.ul.ie \
    --cc=mm-commits@vger.kernel.org \
    --cc=ngupta@vflare.org \
    --cc=semenzato@google.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sjennings@variantweb.net \
    /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.