public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Kyeongdon Kim <kyeongdon.kim@lge.com>
Subject: Re: [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend
Date: Wed, 25 Nov 2015 22:50:20 +0900	[thread overview]
Message-ID: <20151125135020.GA12747@bbox> (raw)
In-Reply-To: <20151125124647.GA525@swordfish>

Hi Sergey,

On Wed, Nov 25, 2015 at 09:46:47PM +0900, Sergey Senozhatsky wrote:
> On (11/25/15 14:51), Minchan Kim wrote:
> [..]
> > +		/*
> > +		 * This function could be called in swapout/fs write path
> > +		 * so we couldn't use GFP_FS|IO. And it assumes we already
> > +		 * have at least one stream in zram initialization so we
> > +		 * don't do best effort to allocate more stream in here.
> > +		 * A default stream will work well without further multiple
> > +		 * stream. That's why we use __GFP_NORETRY|NOWARN|NOMEMALLOC.
> > +		 */
> > +		zstrm = zcomp_strm_alloc(comp, GFP_NOIO|__GFP_NORETRY|
> > +					__GFP_NOWARN|__GFP_NOMEMALLOC);
> [..]
> 
> I think that applying 3/3 before 2/3 will be a simpler (and probably a better)
> thing to do. We fitst extend zcomp interface and pass flags (without any
> functional change) and then extend the flags and introduce vmalloc fallback.

The reason I ordered such way is that I wanted to discuss [2/3] as
stable material after I get your ACK. It solves real problem in android platform
which is real fact and I think it's enough small to send stable tree.
What do you think?

> 
> So we don't have to add comments to lz4/lzo backend that are getting (re-)moved
> in the very next commit.

Fair enough if you don't agree sending [2/3] to stable.

> 
> I will send swapped 2 and 3 patches shortly (I didn't change commit
> messages and SoBs). Please take a look.

Thanks!

> 
> > -	/*
> > -	 * This function could be called in swapout/fs write path
> > -	 * so we couldn't use GFP_FS|IO. And it assumes we already
> > -	 * have at least one stream in zram initialization so we
> > -	 * don't do best effort to allocate more stream in here.
> > -	 * A default stream will work well without further multiple
> > -	 * stream. That's why we use  __GFP_NORETRY|NOWARN|NOMEMALLOC.
> > -	 */
> > -	ret = kzalloc(LZ4_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> > -					__GFP_NOWARN|__GFP_NOMEMALLOC);
> > +	ret = kmalloc(LZ4_MEM_COMPRESS, flags);
> >  	if (!ret)
> > -		ret = __vmalloc(LZ4_MEM_COMPRESS, GFP_NOIO|__GFP_NORETRY|
> > -						__GFP_NOWARN|__GFP_NOMEMALLOC|
> > -						__GFP_ZERO,
> > -						PAGE_KERNEL);
> > +		ret = __vmalloc(LZ4_MEM_COMPRESS, flags, PAGE_KERNEL);
> [..]
> 
> __vmalloc() is still missing __GFP_HIGHMEM

Argh, Sorry.

  reply	other threads:[~2015-11-25 13:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  5:51 [PATCH v2 1/3] zram/zcomp: use GFP_NOIO to allocate streams Minchan Kim
2015-11-25  5:51 ` [PATCH v2 2/3] zram: try vmalloc() after kmalloc() Minchan Kim
2015-11-25  5:51 ` [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend Minchan Kim
2015-11-25 12:46   ` Sergey Senozhatsky
2015-11-25 13:50     ` Minchan Kim [this message]
2015-11-25 15:04       ` Sergey Senozhatsky
2015-11-25 15:20         ` Minchan Kim
2015-11-26  7:39           ` Sergey Senozhatsky
2015-11-25 12:50   ` [PATCH 1/2] " Sergey Senozhatsky
2015-11-25 12:50     ` [PATCH 2/2] zram: try vmalloc() after kmalloc() Sergey Senozhatsky
2015-11-27  2:05   ` [PATCH v2 3/3] zram: pass gfp from zcomp frontend to backend Sergey Senozhatsky
2015-11-27  2:19     ` Sergey Senozhatsky
2015-11-27  2:30       ` Sergey Senozhatsky
     [not found]     ` <CAEwNFnC5edvy2a+-gXP0xU1QPGKrEhQhr_cR6KGL2teskwZPpg@mail.gmail.com>
2015-11-27  3:31       ` Sergey Senozhatsky
  -- strict thread matches above, loose matches on Subject: below --
2015-11-26  7:24 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=20151125135020.GA12747@bbox \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kyeongdon.kim@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox