From: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
To: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Matt Mullins <mmullins@mmlx.us>,
linux-kernel@vger.kernel.org, Rafael Aquini <aquini@redhat.com>
Cc: Sasha Levin <sasha.levin@oracle.com>, stable@vger.kernel.org
Subject: [PATCH] mm/balloon_compaction: fix deflation when compaction is disabled
Date: Wed, 29 Oct 2014 14:51:07 +0400 [thread overview]
Message-ID: <20141029115107.23071.26065.stgit@buzz> (raw)
In-Reply-To: <20141028202333.GC29098@hydra.tuxags.com>
Fix for commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2
("mm/balloon_compaction: redesign ballooned pages management").
If CONFIG_BALLOON_COMPACTION=n balloon_page_insert() does not link
pages with balloon and doesn't set PagePrivate flag, as a result
balloon_page_dequeue cannot get any pages because it thinks that
all of them are isolated. Without balloon compaction nobody can
isolate ballooned pages, it's safe to remove this check.
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Reported-by: Matt Mullins <mmullins@mmlx.us>
Cc: Stable <stable@vger.kernel.org> (v3.17)
---
mm/balloon_compaction.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index b3cbe19..fcad832 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -68,11 +68,13 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info)
* to be released by the balloon driver.
*/
if (trylock_page(page)) {
+#ifdef CONFIG_BALLOON_COMPACTION
if (!PagePrivate(page)) {
/* raced with isolation */
unlock_page(page);
continue;
}
+#endif
spin_lock_irqsave(&b_dev_info->pages_lock, flags);
balloon_page_delete(page);
__count_vm_event(BALLOON_DEFLATE);
--
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 prev parent reply other threads:[~2014-10-29 11:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-27 19:15 [PATCH v3 0/4] mm/balloon_compaction: fixes and cleanups Konstantin Khlebnikov
2014-09-27 19:15 ` [PATCH v3 1/4] mm/balloon_compaction: redesign ballooned pages management Konstantin Khlebnikov
2014-10-28 18:47 ` Matt Mullins
2014-10-28 19:56 ` Konstantin Khlebnikov
2014-10-28 20:23 ` Matt Mullins
2014-10-29 10:51 ` Konstantin Khlebnikov [this message]
2014-10-30 1:06 ` [PATCH] mm/balloon_compaction: fix deflation when compaction is disabled Matt Mullins
2014-09-27 19:15 ` [PATCH v3 2/4] mm/balloon_compaction: remove balloon mapping and flag AS_BALLOON_MAP Konstantin Khlebnikov
2014-09-27 19:15 ` [PATCH v3 3/4] mm/balloon_compaction: add vmstat counters and kpageflags bit Konstantin Khlebnikov
2014-09-27 19:15 ` [PATCH v3 4/4] selftests/vm/transhuge-stress: stress test for memory compaction Konstantin Khlebnikov
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=20141029115107.23071.26065.stgit@buzz \
--to=k.khlebnikov@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=aquini@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mmullins@mmlx.us \
--cc=sasha.levin@oracle.com \
--cc=stable@vger.kernel.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).