From: Mike Galbraith <efault@gmx.de>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block <linux-block@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Mark Brown <broonie@kernel.org>,
linus.walleij@linaro.org, bfq-iosched@googlegroups.com,
oleksandr@natalenko.name
Subject: Re: [PATCH BUGFIX] block, bfq: postpone rq preparation to insert or merge
Date: Mon, 07 May 2018 07:56:37 +0200 [thread overview]
Message-ID: <1525672597.5064.3.camel@gmx.de> (raw)
In-Reply-To: <223CABEA-71E0-426F-A4AB-17BA8437C978@linaro.org>
On Sun, 2018-05-06 at 09:42 +0200, Paolo Valente wrote:
>=20
> diff --git a/block/bfq-mq-iosched.c b/block/bfq-mq-iosched.c
> index 118f319af7c0..6662efe29b69 100644
> --- a/block/bfq-mq-iosched.c
> +++ b/block/bfq-mq-iosched.c
> @@ -525,8 +525,13 @@ static void bfq_limit_depth(unsigned int op, struct =
blk_mq_alloc_data *data)
> if (unlikely(bfqd->sb_shift !=3D bt->sb.shift))
> bfq_update_depths(bfqd, bt);
> =20
> +#if 0
> data->shallow_depth =3D
> bfqd->word_depths[!!bfqd->wr_busy_queues][op_is_sync(op)]=
;
^^^^^^^^^^^^^
Q: why doesn't the top of this function look like so?
---
block/bfq-iosched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -539,7 +539,7 @@ static void bfq_limit_depth(unsigned int
struct bfq_data *bfqd =3D data->q->elevator->elevator_data;
struct sbitmap_queue *bt;
=20
- if (op_is_sync(op) && !op_is_write(op))
+ if (!op_is_write(op))
return;
=20
if (data->flags & BLK_MQ_REQ_RESERVED) {
It looks a bit odd that these elements exist...
+ =A0=A0=A0=A0=A0=A0/*
+ =A0=A0=A0=A0=A0=A0=A0* no more than 75% of tags for sync writes (25% extr=
a tags
+ =A0=A0=A0=A0=A0=A0=A0* w.r.t. async I/O, to prevent async I/O from starvi=
ng sync
+ =A0=A0=A0=A0=A0=A0=A0* writes)
+ =A0=A0=A0=A0=A0=A0=A0*/
+ =A0=A0=A0=A0=A0=A0bfqd->word_depths[0][1] =3D max(((1U<<bfqd->sb_shift) *=
3)>>2, 1U);
+ =A0=A0=A0=A0=A0=A0/* no more than ~37% of tags for sync writes (~20% extr=
a tags) */
+ =A0=A0=A0=A0=A0=A0bfqd->word_depths[1][1] =3D max(((1U<<bfqd->sb_shift) *=
6)>>4, 1U);
...yet we index via and log a guaranteed zero.
-Mike
WARNING: multiple messages have this Message-ID (diff)
From: Mike Galbraith <efault@gmx.de>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block <linux-block@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Mark Brown <broonie@kernel.org>,
linus.walleij@linaro.org, bfq-iosched@googlegroups.com,
oleksandr@natalenko.name
Subject: Re: [PATCH BUGFIX] block, bfq: postpone rq preparation to insert or merge
Date: Mon, 07 May 2018 07:56:37 +0200 [thread overview]
Message-ID: <1525672597.5064.3.camel@gmx.de> (raw)
In-Reply-To: <223CABEA-71E0-426F-A4AB-17BA8437C978@linaro.org>
On Sun, 2018-05-06 at 09:42 +0200, Paolo Valente wrote:
>
> diff --git a/block/bfq-mq-iosched.c b/block/bfq-mq-iosched.c
> index 118f319af7c0..6662efe29b69 100644
> --- a/block/bfq-mq-iosched.c
> +++ b/block/bfq-mq-iosched.c
> @@ -525,8 +525,13 @@ static void bfq_limit_depth(unsigned int op, struct blk_mq_alloc_data *data)
> if (unlikely(bfqd->sb_shift != bt->sb.shift))
> bfq_update_depths(bfqd, bt);
>
> +#if 0
> data->shallow_depth =
> bfqd->word_depths[!!bfqd->wr_busy_queues][op_is_sync(op)];
^^^^^^^^^^^^^
Q: why doesn't the top of this function look like so?
---
block/bfq-iosched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -539,7 +539,7 @@ static void bfq_limit_depth(unsigned int
struct bfq_data *bfqd = data->q->elevator->elevator_data;
struct sbitmap_queue *bt;
- if (op_is_sync(op) && !op_is_write(op))
+ if (!op_is_write(op))
return;
if (data->flags & BLK_MQ_REQ_RESERVED) {
It looks a bit odd that these elements exist...
+ /*
+ * no more than 75% of tags for sync writes (25% extra tags
+ * w.r.t. async I/O, to prevent async I/O from starving sync
+ * writes)
+ */
+ bfqd->word_depths[0][1] = max(((1U<<bfqd->sb_shift) * 3)>>2, 1U);
+ /* no more than ~37% of tags for sync writes (~20% extra tags) */
+ bfqd->word_depths[1][1] = max(((1U<<bfqd->sb_shift) * 6)>>4, 1U);
...yet we index via and log a guaranteed zero.
-Mike
next prev parent reply other threads:[~2018-05-07 5:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 17:17 [PATCH BUGFIX] block, bfq: postpone rq preparation to insert or merge Paolo Valente
2018-05-04 19:46 ` Mike Galbraith
2018-05-05 8:19 ` Mike Galbraith
2018-05-05 10:39 ` Paolo Valente
2018-05-05 10:39 ` Paolo Valente
2018-05-05 14:56 ` Mike Galbraith
2018-05-05 14:56 ` Mike Galbraith
2018-05-06 7:42 ` Paolo Valente
2018-05-06 7:42 ` Paolo Valente
2018-05-07 2:43 ` Mike Galbraith
2018-05-07 2:43 ` Mike Galbraith
2018-05-07 3:23 ` Mike Galbraith
2018-05-07 3:23 ` Mike Galbraith
2018-05-07 9:32 ` Paolo Valente
2018-05-07 9:32 ` Paolo Valente
2018-05-07 5:56 ` Mike Galbraith [this message]
2018-05-07 5:56 ` Mike Galbraith
2018-05-07 9:27 ` Paolo Valente
2018-05-07 9:27 ` Paolo Valente
2018-05-07 10:01 ` Mike Galbraith
2018-05-07 10:01 ` Mike Galbraith
2018-05-07 18:03 ` Paolo Valente
2018-05-07 18:03 ` Paolo Valente
2018-05-06 7:33 ` Oleksandr Natalenko
2018-05-10 16:14 ` Bart Van Assche
2018-05-10 16:14 ` Bart Van Assche
2018-05-14 17:16 ` Paolo Valente
2018-05-14 17:16 ` Paolo Valente
2018-05-14 17:31 ` Jens Axboe
2018-05-14 17:37 ` Paolo Valente
2018-05-14 17:37 ` Paolo Valente
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=1525672597.5064.3.camel@gmx.de \
--to=efault@gmx.de \
--cc=axboe@kernel.dk \
--cc=bfq-iosched@googlegroups.com \
--cc=broonie@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr@natalenko.name \
--cc=paolo.valente@linaro.org \
--cc=ulf.hansson@linaro.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 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.