From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Nitin Gupta <ngupta@vflare.org>,
Jerome Marchand <jmarchan@redhat.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Minchan Kim <minchan@kernel.org>
Subject: [PATCH 2/7] zram: delay pending free request in read path
Date: Mon, 13 Jan 2014 20:18:57 +0900 [thread overview]
Message-ID: <1389611942-15544-3-git-send-email-minchan@kernel.org> (raw)
In-Reply-To: <1389611942-15544-1-git-send-email-minchan@kernel.org>
Sergey Senozhatsky reporetd we don't need to handle pending free
request every I/O so that this patch removes it in read path while
we remain it in write path.
Let's consider below example.
Swap subsystem ask to zram "A" block free by swap_slot_free_notify
but zram had been pended it without real freeing.
Swap subsystem allocates "A" block for new data but request pended
for a long time just handled and zram blindly free new data on
the "A" block. :(
That's why we couldn't remove handle pending free request right before
zram-write.
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
drivers/block/zram/zram_drv.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 213dfc1..d87c7e9 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -535,7 +535,6 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index,
if (rw == READ) {
down_read(&zram->lock);
- handle_pending_slot_free(zram);
ret = zram_bvec_read(zram, bvec, index, offset, bio);
up_read(&zram->lock);
} else {
--
1.8.4.3
next prev parent reply other threads:[~2014-01-13 11:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 11:18 [PATCH 0/7] zram bug fix and lock redesign Minchan Kim
2014-01-13 11:18 ` [PATCH 1/7] zram: fix race between reset and flushing pending work Minchan Kim
2014-01-13 23:55 ` Andrew Morton
2014-01-14 0:15 ` Minchan Kim
2014-01-14 7:14 ` Sergey Senozhatsky
2014-01-13 11:18 ` Minchan Kim [this message]
2014-01-13 11:18 ` [PATCH 3/7] zram: remove unnecessary free Minchan Kim
2014-01-13 11:18 ` [PATCH 4/7] zram: use atomic operation for stat Minchan Kim
2014-01-13 23:58 ` Andrew Morton
2014-01-14 0:19 ` Minchan Kim
2014-01-14 0:23 ` Andrew Morton
2014-01-14 0:38 ` Minchan Kim
2014-01-13 11:19 ` [PATCH 5/7] zram: introduce zram->tb_lock Minchan Kim
2014-01-13 11:19 ` [PATCH 6/7] zram: remove workqueue for freeing removed pending slot Minchan Kim
2014-01-13 19:42 ` Sergey Senozhatsky
2014-01-13 23:38 ` Minchan Kim
2014-01-14 7:09 ` Sergey Senozhatsky
2014-01-13 11:19 ` [PATCH 7/7] zram: remove unnecessary lock Minchan Kim
2014-01-14 9:29 ` Jerome Marchand
2014-01-15 1:34 ` Minchan Kim
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=1389611942-15544-3-git-send-email-minchan@kernel.org \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=sergey.senozhatsky@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.