linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Nitin Gupta <ngupta@vflare.org>
Cc: Yonghai Huang <huangyh@marvell.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: zsmalloc failure issue in low memory conditions
Date: Fri, 4 Jul 2014 14:49:57 +0900	[thread overview]
Message-ID: <20140704054957.GG2939@bbox> (raw)
In-Reply-To: <53B61E6B.1030406@vflare.org>

On Thu, Jul 03, 2014 at 08:24:27PM -0700, Nitin Gupta wrote:
> Hi Yonghai,
> 
> CC'ing the current maintainer, Minchan Kim.

Thanks for Ccing me, Nitin.

> 
> Thanks,
> Nitin
> 
> On 7/3/14, 5:03 PM, Yonghai Huang wrote:
> >
> >Hi, nugpta and all:
> >
> >Sorry to distribute you, now I met zsmalloc failure issue in very
> >low memory conditions, and i found someone already have met such
> >issue, and have had discussions, but looks like no final patch for
> >it, i don't know whether there are patches to fix it. could you
> >give some advice on it?
> >
> >Below is discussion link for it:
> >
> >
> >  http://linux-kernel.2935.n7.nabble.com/zram-zsmalloc-issues-in-very-low-memory-conditions-td742009.html
> >

At that time, I didn't have a time to look at it by biz trip but
reported twice until now so I'd like to bring up the issue.

zRAM works with reserved memory(ex, zone->low - zone->min) so
if you increased min_free_kbytes, maybe the problem would be gone
but it's not a proper fix, I think because if some of other(ex,
proprietary driver) deplete the reserved memory with __GFP_MEMALLOC
or PF_MEMALLOC, zsmalloc could be failed although it's rare
in current mainline but VM can reclaim file-backed pages still
so system can go without OOM kill while swap layer can emit lots
of warning message about failing write. :(

For me, ideal solution is to need to feedback loop from zram block
driver to VM via congestion control(Currently, reclaim of VM doesn't
consider swap backend's congestion state but not too hard to fix)
as Olav suggested but it has another issue to update uncongestion
state from zram side but finally we could find a solution, I believe. :)

But before diving into the implementation, I need to reproduce
the problem and maybe it would be helpful if you says your enviroment.

1. CPU
2. RAM size
3. zram disksize
4. /proc/sys/vm/page-cluster
5. /sys/block/zram0/max_comp_streams
6. what workload do you have?
7. /proc/zoneinfo
8. What kinds of file system do you use?
9. What kinds of workload do you have when the problem happens?
10. It would be really helpful if you can get /proc/vmstat when the problem happened.

Anyway, I will have a time to reproduce/investigate the problem next week
and get back to you.

Thanks for the report!

-- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2014-07-04  5:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  0:03 zsmalloc failure issue in low memory conditions Yonghai Huang
2014-07-04  3:24 ` Nitin Gupta
2014-07-04  5:49   ` Minchan Kim [this message]

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=20140704054957.GG2939@bbox \
    --to=minchan@kernel.org \
    --cc=huangyh@marvell.com \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).