From: Wang Sheng-Hui <shhuiw@gmail.com>
To: sjennings@variantweb.net
Cc: linux-mm@kvack.org, Wang Sheng-Hui <shhuiw@gmail.com>
Subject: [PATCH] mm: reposition zbud page in lru list if not freed in zbud_free
Date: Sun, 31 Aug 2014 21:29:29 +0800 [thread overview]
Message-ID: <1409491769-10530-1-git-send-email-shhuiw@gmail.com> (raw)
Reposition zbud page in the lru list of the pool if the zbud page
is not freed in zbud_free.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/zbud.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/zbud.c b/mm/zbud.c
index f26e7fc..b1d7777 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -432,15 +432,16 @@ void zbud_free(struct zbud_pool *pool, unsigned long handle)
/* Remove from existing buddy list */
list_del(&zhdr->buddy);
+ list_del(&zhdr->lru);
if (zhdr->first_chunks == 0 && zhdr->last_chunks == 0) {
/* zbud page is empty, free */
- list_del(&zhdr->lru);
free_zbud_page(zhdr);
pool->pages_nr--;
} else {
/* Add to unbuddied list */
freechunks = num_free_chunks(zhdr);
list_add(&zhdr->buddy, &pool->unbuddied[freechunks]);
+ list_add(&zhdr->lru, &pool->lru);
}
spin_unlock(&pool->lock);
--
1.8.3.2
--
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:[~2014-08-31 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-31 13:29 Wang Sheng-Hui [this message]
[not found] ` <20140902143936.GA11096@cerebellum.variantweb.net>
2014-09-02 23:59 ` [PATCH] mm: reposition zbud page in lru list if not freed in zbud_free Wang Sheng-Hui
2014-09-03 0:06 ` Wang Sheng-Hui
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=1409491769-10530-1-git-send-email-shhuiw@gmail.com \
--to=shhuiw@gmail.com \
--cc=linux-mm@kvack.org \
--cc=sjennings@variantweb.net \
/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).