public inbox for [email protected]
 help / color / mirror / Atom feed
From: Christoph Hellwig <[email protected]>
To: Jeffle Xu <[email protected]>
Cc: [email protected], [email protected], [email protected],
	[email protected], [email protected],
	[email protected]
Subject: Re: [PATCH v4 2/2] block,iomap: disable iopoll when split needed
Date: Thu, 19 Nov 2020 17:55:16 +0000	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index 933f234d5bec..396ac0f91a43 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -309,6 +309,16 @@ iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length,
>  		copied += n;
>  
>  		nr_pages = iov_iter_npages(dio->submit.iter, BIO_MAX_PAGES);
> +		/*
> +		 * The current dio needs to be split into multiple bios here.
> +		 * iopoll for split bio will cause subtle trouble such as
> +		 * hang when doing sync polling, while iopoll is initially
> +		 * for small size, latency sensitive IO. Thus disable iopoll
> +		 * if split needed.
> +		 */
> +		if (nr_pages)
> +			dio->iocb->ki_flags &= ~IOCB_HIPRI;

I think this is confusing two things.  One is that we don't handle
polling well when there are multiple bios.  For this I think we should
only call bio_set_polled when we know there is a single bio.  But it
has nothing to do with a bio being split, as we can't know that at this
level.

  parent reply	other threads:[~2020-11-19 17:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  7:56 [PATCH v4 0/2] block, iomap: disable iopoll for split bio Jeffle Xu
2020-11-17  7:56 ` [PATCH v4 1/2] block: " Jeffle Xu
2020-11-19  3:06   ` JeffleXu
2020-11-19 17:52   ` Christoph Hellwig
2020-11-20  9:22     ` JeffleXu
2020-11-17  7:56 ` [PATCH v4 2/2] block,iomap: disable iopoll when split needed Jeffle Xu
2020-11-17 17:37   ` Darrick J. Wong
2020-11-18  1:56     ` JeffleXu
2020-11-19 17:55   ` Christoph Hellwig [this message]
2020-11-20 10:06     ` JeffleXu
2020-11-24 11:25       ` Christoph Hellwig
2020-11-25  7:03         ` JeffleXu
2020-11-17 12:51 ` [PATCH v4 0/2] block, iomap: disable iopoll for split bio JeffleXu
2020-11-18  9:50   ` JeffleXu

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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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