linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Michal Hocko <mhocko@kernel.org>, Alexandr <sss123next@list.ru>,
	Seth Jennings <sjenning@redhat.com>,
	Minchan Kim <minchan@kernel.org>,
	bugzilla-daemon@bugzilla.kernel.org,
	Linux-MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Bug 192571] zswap + zram enabled BUG
Date: Wed, 18 Jan 2017 23:42:50 -0500	[thread overview]
Message-ID: <CALZtONB+MGb2uPaDzQ+sMpa-OO-0q4WHvavYsJnBeCO3CYwGwg@mail.gmail.com> (raw)
In-Reply-To: <20170119030004.GA2046@jagdpanzerIV.localdomain>

On Wed, Jan 18, 2017 at 10:00 PM, Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
> On (01/18/17 20:36), Dan Streetman wrote:
>> On Wed, Jan 18, 2017 at 8:17 AM, Michal Hocko <mhocko@kernel.org> wrote:
>> > On Wed 18-01-17 10:39:48, Sergey Senozhatsky wrote:
>> >> Cc Dan
>> >>
>> >> On (01/17/17 12:22), Andrew Morton wrote:
>> >> > > https://bugzilla.kernel.org/show_bug.cgi?id=192571
>> >> > >
>> >> > > --- Comment #1 from Gluzskiy Alexandr <sss123next@list.ru> ---
>> >> > > [199961.576604] ------------[ cut here ]------------
>> >> > > [199961.577830] kernel BUG at mm/zswap.c:1108!
>> >>
>> >> zswap didn't manage to decompress the page:
>> >>
>> >> static int zswap_frontswap_load(unsigned type, pgoff_t offset,
>> >>                               struct page *page)
>> >> {
>> >> ...
>> >>       dst = kmap_atomic(page);
>> >>       tfm = *get_cpu_ptr(entry->pool->tfm);
>> >>       ret = crypto_comp_decompress(tfm, src, entry->length, dst, &dlen);
>> >>       put_cpu_ptr(entry->pool->tfm);
>> >>       kunmap_atomic(dst);
>> >>       zpool_unmap_handle(entry->pool->zpool, entry->handle);
>> >>       BUG_ON(ret);
>> >>       ^^^^^^^^^^^
>> >
>> > Ugh, why do we even do that? This is not the way how to handle error
>> > situations. AFAIU propagating the error out wouldn't be a big deal
>> > because we would just fallback to regular swap, right?
>>
>> yeah this function definitely should never bug; it's just a callback
>> from the zpool to try to write a page back to the swapcache so the
>> zpool can free a page.  It's definitely ok for it to return an error.
>>
>
> good. Dan, Seth, care to send the patch?

damn, i misread the trace.  I need to stop reading bug emails late at night.

I just sent a patch to change the BUG calls in zswap_writeback_entry()
as those are totally recoverable, but the BUG here is from
zswap_frontswap_load(), and a failure there isn't recoverable.

Unfortunately, if we accepted the page, but now can't recover it, it's
gone and returning error from zswap_frontswap_load() will just cause
page_io.c to go read the swap disk; and what's on there is not the
page we're looking for, it's undefined as we didn't actually ever
write the swap page to disk (unless frontswap_writethrough is
enabled).

Ill have to look at this again in the morning.

> and one more thing... can you take a look at [1]?

yeah, i've been meaning to get to that as well, will send something tomorrow.

>
> [1] https://marc.info/?l=linux-mm&m=147031191906154&w=4
>
>         -ss
>

--
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>

      parent reply	other threads:[~2017-01-19  4:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-192571-27@https.bugzilla.kernel.org/>
     [not found] ` <bug-192571-27-qFfm1cXEv4@https.bugzilla.kernel.org/>
2017-01-17 20:22   ` Andrew Morton
2017-01-18  1:39     ` Sergey Senozhatsky
2017-01-18  5:58       ` Alexandr
2017-01-19  2:56         ` Dan Streetman
2017-01-24  0:03           ` Alexandr
2017-01-24 20:16             ` Dan Streetman
2017-01-25  4:02               ` Chulmin Kim
2017-01-26 17:09                 ` Dan Streetman
2017-01-25  6:42               ` Alexandr
2017-01-18 13:17       ` Michal Hocko
2017-01-19  1:36         ` Dan Streetman
2017-01-19  3:00           ` Sergey Senozhatsky
2017-01-19  4:20             ` [PATCH] zswap: change BUG to WARN in zswap_writeback_entry Dan Streetman
2017-01-19  5:15               ` Sergey Senozhatsky
2017-01-19 15:36                 ` Dan Streetman
2017-01-19  4:42             ` Dan Streetman [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=CALZtONB+MGb2uPaDzQ+sMpa-OO-0q4WHvavYsJnBeCO3CYwGwg@mail.gmail.com \
    --to=ddstreet@ieee.org \
    --cc=akpm@linux-foundation.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sjenning@redhat.com \
    --cc=sss123next@list.ru \
    /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