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: Andrew Morton <akpm@linux-foundation.org>,
	Kyeongdon Kim <kyeongdon.kim@lge.com>,
	ngupta@vflare.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] zram: try vmalloc() after kmalloc()
Date: Tue, 24 Nov 2015 12:56:37 +0900	[thread overview]
Message-ID: <20151124035637.GE3882@blaptop> (raw)
In-Reply-To: <20151124010622.GB705@swordfish>

On Tue, Nov 24, 2015 at 10:06:22AM +0900, Sergey Senozhatsky wrote:
> 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)?

No, you didn't miss anything and your question is really proper.
Actually, I was on same page with you but when I think more,
I guess it makes code looks clean and right way for structuring, IMO.
So, I coded now and am preasure with it. I hope you are on same
page when you look at new patchset. :)

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

Hmm, I don't think it's really trouble part we cannot fix easily
so let's stay with it!


> 
> 	-ss

-- 
Kind regards,
Minchan Kim

  reply	other threads:[~2015-11-24  3:57 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
2015-11-24  3:56           ` Minchan Kim [this message]
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=20151124035637.GE3882@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=kyeongdon.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@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.