lkml.org 
[lkml]   [2018]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: [PATCH v2] z3fold: fix reclaim lock-ups
Date
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
\
 
 \ /
  Last update: 2018-05-11 06:56    [W:0.035 / U:14.032 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site