From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: 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 09:35:00 +0900 [thread overview]
Message-ID: <20151124003500.GD3882@blaptop> (raw)
In-Reply-To: <20151123154029.ec1cb910a827ddf51aa986c4@linux-foundation.org>
On Mon, Nov 23, 2015 at 03:40:29PM -0800, Andrew Morton wrote:
> On Tue, 24 Nov 2015 08:28:57 +0900 Minchan Kim <minchan@kernel.org> wrote:
>
> > > What's the reasoning behind the modification to the gfp flags?
> > >
> > > It clears __GFP_FS, __GFP_IO and even __GFP_WAIT. I suspect the latter
> > > two (at least) can be retained. And given that vmalloc() uses
> >
> > This function is used in swapout and fs write path so we couldn't use
> > those flags.
>
> 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.
Thanks, Andrew,
>
--
Kind regards,
Minchan Kim
next prev parent reply other threads:[~2015-11-24 0:35 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 [this message]
2015-11-24 1:06 ` Sergey Senozhatsky
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=20151124003500.GD3882@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox