All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>
Subject: Re: [PATCH] dm-zoned: Avoid metadata flush writeback throttling
Date: Mon, 24 Jul 2017 01:03:20 -0700	[thread overview]
Message-ID: <20170724080320.GA16608@infradead.org> (raw)
In-Reply-To: <20170724074422.23948-1-damien.lemoal@wdc.com>

On Mon, Jul 24, 2017 at 04:44:22PM +0900, Damien Le Moal wrote:
> Avoid metadata flush to be blocked by the writeback throttling code in
> wbt_wait(). Otherwise, we can end up with a deadlock under heavy write
> load with all chunk works active. In such situation, a deadlock can
> happen if the flush work is blocked by the throttling code while holding
> the metadata lock: as the chunk works will wait for the metadata lock
> too, no progress can be made.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  drivers/md/dm-zoned-metadata.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
> index 884ff7c170a0..f694fb98b002 100644
> --- a/drivers/md/dm-zoned-metadata.c
> +++ b/drivers/md/dm-zoned-metadata.c
> @@ -567,7 +567,8 @@ static void dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk,
>  	bio->bi_bdev = zmd->dev->bdev;
>  	bio->bi_private = mblk;
>  	bio->bi_end_io = dmz_mblock_bio_end_io;
> -	bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_META | REQ_PRIO);
> +	bio_set_op_attrs(bio, REQ_OP_WRITE,
> +			 REQ_META | REQ_PRIO | REQ_SYNC | REQ_IDLE);

Please just assign bi_opf directly instea dof using bio_set_op_attrs
in new code.

Also what do you need REQ_IDLE for?

  reply	other threads:[~2017-07-24  8:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24  7:44 [PATCH] dm-zoned: Avoid metadata flush writeback throttling Damien Le Moal
2017-07-24  8:03 ` Christoph Hellwig [this message]
2017-07-24  9:16   ` Damien Le Moal
2017-09-11 15:05     ` Mike Snitzer
2017-09-12  5:46       ` Damien Le Moal
2017-09-12  6:12       ` Mikulas Patocka
2017-09-12  8:01         ` Damien Le Moal
2017-09-12 10:32           ` Mikulas Patocka
2017-09-13  0:38             ` Damien Le Moal

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=20170724080320.GA16608@infradead.org \
    --to=hch@infradead.org \
    --cc=agk@redhat.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@redhat.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.