LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jongseok Kim <ks77sj@gmail.com>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jongseok Kim <ks77sj@gmail.com>
Subject: RE: [PATCH v2] z3fold: fix reclaim lock-ups
Date: Fri, 11 May 2018 13:55:24 +0900	[thread overview]
Message-ID: <1526014524-5888-1-git-send-email-ks77sj@gmail.com> (raw)
In-Reply-To: <1525846319-6179-1-git-send-email-ks77sj@gmail.com>

A headless page also need to be set UNDER_RECLAIM in previous
reply, but I missed it.

---
 mm/z3fold.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index 5f659ab..8536a47 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -849,10 +849,10 @@ static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
 			kref_get(&zhdr->refcount);
 			list_del_init(&zhdr->buddy);
 			zhdr->cpu = -1;
-			set_bit(UNDER_RECLAIM, &page->private);
 			break;
 		}
 
+		set_bit(UNDER_RECLAIM, &page->private);
 		list_del_init(&page->lru);
 		spin_unlock(&pool->lock);
 
@@ -899,6 +899,7 @@ static int z3fold_reclaim_page(struct z3fold_pool *pool, unsigned int retries)
 		}
 next:
 		if (test_bit(PAGE_HEADLESS, &page->private)) {
+			clear_bit(UNDER_RECLAIM, &page->private);
 			if (ret == 0) {
 				free_z3fold_page(page);
 				atomic64_dec(&pool->pages_nr);
-- 
2.7.4

      reply	other threads:[~2018-05-11  4:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  6:36 Jongseok Kim
2018-05-06  9:39 ` Vitaly Wool
2018-05-09  6:11   ` Jongseok Kim
2018-05-11  4:55     ` Jongseok 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=1526014524-5888-1-git-send-email-ks77sj@gmail.com \
    --to=ks77sj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vitalywool@gmail.com \
    --subject='RE: [PATCH v2] z3fold: fix reclaim lock-ups' \
    /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

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