public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Kyeongdon Kim <kyeongdon.kim@lge.com>,
	ngupta@vflare.org, sergey.senozhatsky.work@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] zram: try vmalloc() after kmalloc()
Date: Tue, 24 Nov 2015 10:06:22 +0900	[thread overview]
Message-ID: <20151124010622.GB705@swordfish> (raw)
In-Reply-To: <20151124003500.GD3882@blaptop>

On (11/24/15 09:35), Minchan Kim wrote:
[..]
> > We can use __GFP_RECLAIM (used to be __GFP_WAIT).  That permits the
> > allocation to wait for in-flight IO to complete and to reclaim clean
> > pagecache.
> 
> Generally, you're right but in case of zram, it would be unfortunate.
> 
> It would be void *most of time* because it is called in reclaim context
> and reclaim path bails out to avoid recursion of direct reclaim
> by PF_MEMALLOC without trying reclaim.
> However, the reason I said *most of time* is we has another context
> the funcion could be called.
> 
>         "disksize_store"->zcomp_create
> 
> In the place, we should make sure the successful allocation to work
> zram at least so that path should use another gfp.
> I will work for that.

Hm... is it really worth it? passing a bool to zcomp_strm_alloc() (so
it can decide what gfp flags to use) or gfp flags directly is just a
bit complicated. what's the problem with GFP_NOIO (__GFP_RECLAIM) in
the first place (sorry if I'm missing something terribly obvious)?

alternatively, we can just remove the 'dynamic' streams allocation part
and allocate all of the streams via sysfs store path only.

	-ss

  reply	other threads:[~2015-11-24  1:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23  6:21 [PATCH v3] zram: try vmalloc() after kmalloc() Kyeongdon Kim
2015-11-23  6:35 ` Minchan Kim
2015-11-23  7:26   ` Sergey Senozhatsky
2015-11-23 22:52 ` Andrew Morton
2015-11-23 23:28   ` Minchan Kim
2015-11-23 23:40     ` Andrew Morton
2015-11-24  0:35       ` Minchan Kim
2015-11-24  1:06         ` Sergey Senozhatsky [this message]
2015-11-24  3:56           ` Minchan Kim
2015-11-24  8:09     ` Kyeongdon Kim
2015-11-24  8:15       ` Minchan Kim
2015-11-24  7:56   ` Kyeongdon 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=20151124010622.GB705@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kyeongdon.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    /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