From: Jack Wang <jinpu.wang-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
To: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org
Cc: dongsu.park-EIkl63zCoXaH+58JC4qpiA@public.gmane.org
Subject: Re: bcache strange behaviour in write back mode
Date: Wed, 24 Apr 2013 21:49:07 +0200 [thread overview]
Message-ID: <51783733.9080907@profitbricks.com> (raw)
In-Reply-To: <51758C42.4040708-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
I revert this commit:
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index e5ff12e..2f36743 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -489,6 +489,12 @@ static void bch_insert_data_loop(struct closure *cl)
bch_queue_gc(op->c);
}
+ /*
+ * Journal writes are marked REQ_FLUSH; if the original write was a
+ * flush, it'll wait on the journal write.
+ */
+ bio->bi_rw &= ~(REQ_FLUSH|REQ_FUA);
+
do {
unsigned i;
struct bkey *k;
@@ -716,7 +722,7 @@ static struct search *search_alloc(struct bio *bio,
struct bcache_device *d)
s->task = current;
s->orig_bio = bio;
s->write = (bio->bi_rw & REQ_WRITE) != 0;
- s->op.flush_journal = (bio->bi_rw & REQ_FLUSH) != 0;
+ s->op.flush_journal = (bio->bi_rw & (REQ_FLUSH|REQ_FUA)) != 0;
s->op.skip = (bio->bi_rw & REQ_DISCARD) != 0;
s->recoverable = 1;
s->start_time = jiffies;
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 6817ea4..0932580 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -766,6 +766,8 @@ static int bcache_device_init(struct bcache_device
*d, unsigned block_size)
set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags);
set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags);
+ blk_queue_flush(q, REQ_FLUSH|REQ_FUA);
+
return 0;
}
the strange behaviour is gone. And I checked the bcache-testing, it does
not contain that commit any more, maybe I'm lost in the git tree update.
Anyway, thanks Kent for your kindly support.
Jack
On 2013年04月22日 21:15, Jack Wang wrote:
> Hi all,
>
> We've seen strange behaviour in bcache mode in current bcache-testing
> branch with Possible allocator fix:
>
> Once I start writing data with "dd if=/dev/zero of=/dev/bcache0 bs=4k
> count=10000 oflag=sync", all SSDs in the Pool go close to 100% util and
> I see about 3600 writes/second in iostat for each disk in the pool, BUT
> no data written in means of throughput.
>
> Then after some seconds (the flush interval of bcache) I see the flush
> of the writeback and also data written to the pool SSDs which looks
> pretty much like reordering and merging happened for that data.
>
> bcache-3.2 does not have such problem.
> only bcache(master) and bcache-testing have such problem.
>
> What's the possible reason?
>
> Regards,
> Jack
>
next prev parent reply other threads:[~2013-04-24 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 19:15 bcache strange behaviour in write back mode Jack Wang
[not found] ` <CAC7rs0u=epPv0c_swBSifi_fDRC0k9WpZ+34OmFdgxjR3-8WcA@mail.gmail.com>
[not found] ` <CAC7rs0u=epPv0c_swBSifi_fDRC0k9WpZ+34OmFdgxjR3-8WcA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-22 20:27 ` Jack Wang
[not found] ` <51759D17.5040204-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-04-22 21:51 ` Kent Overstreet
[not found] ` <20130422215138.GA9931-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-04-23 11:56 ` Jack Wang
[not found] ` <517676E7.4030805-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-04-23 18:40 ` Kent Overstreet
[not found] ` <CAH+dOxL9Ajsp7fruw-9nC63rJLzOqBYreeE1URxF945-pv6vug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-24 6:56 ` Jack Wang
[not found] ` <51758C42.4040708-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-04-22 20:26 ` Kent Overstreet
2013-04-24 19:49 ` Jack Wang [this message]
[not found] ` <51783733.9080907-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-04-24 20:13 ` Kent Overstreet
[not found] ` <CAC7rs0s-_e1WaymU1OcuBv+Tf8hiJLED=m5Qrpxhar6Zk3H9uQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-24 20:29 ` Jack Wang
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=51783733.9080907@profitbricks.com \
--to=jinpu.wang-eikl63zcoxah+58jc4qpia@public.gmane.org \
--cc=dongsu.park-EIkl63zCoXaH+58JC4qpiA@public.gmane.org \
--cc=koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.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