From: Dan Streetman <ddstreet@ieee.org>
To: Linux-MM <linux-mm@kvack.org>, Andrew Morton <akpm@linux-foundation.org>
Cc: Dan Streetman <ddstreet@ieee.org>,
Seth Jennings <sjenning@redhat.com>,
Michal Hocko <mhocko@kernel.org>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Minchan Kim <minchan@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Fix zswap init failure behavior
Date: Tue, 24 Jan 2017 15:02:56 -0500 [thread overview]
Message-ID: <20170124200259.16191-1-ddstreet@ieee.org> (raw)
If zswap fails to initialize itself at boot, it returns error from its
init function; but for built-in drivers, that does not unload them; and
more importantly, it doesn't prevent their sysfs module param interface
from being created. In this case, changing the compressor or zpool param
will result in a WARNING because zswap didn't expect them to be changed if
initialization failed.
These patches fix that assumption, as well as allowing pool creation after
a failed initialization, if only the zpool and/or compressor creation
failed.
Dan Streetman (3):
zswap: disable changing params if init fails
zswap: allow initialization at boot without pool
zswap: clear compressor or zpool param if invalid at init
mm/zswap.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 100 insertions(+), 25 deletions(-)
--
2.9.3
--
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>
next reply other threads:[~2017-01-24 20:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 20:02 Dan Streetman [this message]
2017-01-24 20:02 ` [PATCH 1/3] zswap: disable changing params if init fails Dan Streetman
2017-01-24 21:24 ` Andrew Morton
2017-01-24 22:12 ` Dan Streetman
2017-01-24 20:02 ` [PATCH 2/3] zswap: allow initialization at boot without pool Dan Streetman
2017-01-25 0:24 ` Sergey Senozhatsky
2017-01-25 16:36 ` Dan Streetman
2017-01-24 20:02 ` [PATCH 3/3] zswap: clear compressor or zpool param if invalid at init Dan Streetman
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=20170124200259.16191-1-ddstreet@ieee.org \
--to=ddstreet@ieee.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.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 \
/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).