From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Kyeongdon Kim <kyeongdon.kim@lge.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [PATCH 2/3] zram: try vmalloc() after kmalloc()
Date: Tue, 24 Nov 2015 17:07:34 +0900 [thread overview]
Message-ID: <20151124080734.GB1254@swordfish> (raw)
In-Reply-To: <20151124075707.GA32717@blaptop>
On (11/24/15 16:57), Minchan Kim wrote:
[..]
> > hm, ok, may be.
> > but the question whether we want to waste pages on additional streams
> > (especially, e.g. if we already have, say, 10 streams) is still valid.
> > a more intuitive here is to release some unneeded streams, not to increase
> > our pressure allocating new ones. well, at least it seems to be so.
> > those pages can be used by zsmalloc, for example.
>
> I think your claim make sense if the failure comes from high memory
> pressure but order-3 alloc failure even if there are lots of order-0
> free pages in my experience is easy to encouter so I think it doesn't
> mean memory pressure but just memory fragmentation.
hm, yes, fragmentation can be one of the reasons.
> > > > ... and add GFP_NOIO to both kzalloc() and __vmalloc().
> > >
> > > I can add it. The harmness is really ignorable but as I mentioned
> > > at reply of Andrew, what's the benefit with GFP_NOIO?
> > > We couldn't make forward progress with __GFP_RECLAIM in reclaim
> > > context.
> >
> > aha, I probably missed that out.
> > (well, and, technically, things can change).
>
> My speaking came from MM internal knowledge so I accept your concern.
> if you prefer like GFP_NOIO, I will use it in next spin which
> makes reader less confused.
ok, I found your comment
: 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.
well, we also allocate streams from sysfs store and during 'normal' IO
(e.g. from fs). wouldn't GFP_NOIO be helpful there?
-ss
next prev parent reply other threads:[~2015-11-24 8:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 4:01 [PATCH 1/3] zram/zcomp: use GFP_NOIO to allocate streams Minchan Kim
2015-11-24 4:01 ` [PATCH 2/3] zram: try vmalloc() after kmalloc() Minchan Kim
2015-11-24 4:01 ` [RFC 3/3] zram: pass gfp from zcomp frontend to backend Minchan Kim
2015-11-24 6:00 ` [PATCH 1/3] zram/zcomp: use GFP_NOIO to allocate streams Sergey Senozhatsky
2015-11-24 7:10 ` Minchan Kim
2015-11-24 6:12 ` [PATCH 2/3] zram: try vmalloc() after kmalloc() Sergey Senozhatsky
2015-11-24 6:42 ` Sergey Senozhatsky
2015-11-24 7:08 ` Minchan Kim
2015-11-24 7:03 ` Minchan Kim
2015-11-24 7:36 ` Sergey Senozhatsky
2015-11-24 7:57 ` Minchan Kim
2015-11-24 8:07 ` Sergey Senozhatsky [this message]
2015-11-24 8:14 ` Minchan 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=20151124080734.GB1254@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=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