From: John Garry <john.g.garry@oracle.com>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH 1/2] block: don't bother checking the data direction for merges
Date: Tue, 19 Nov 2024 16:48:15 +0000 [thread overview]
Message-ID: <427189c2-dff8-4af8-a805-31d78019cc7b@oracle.com> (raw)
In-Reply-To: <20241119161157.1328171-2-hch@lst.de>
On 19/11/2024 16:11, Christoph Hellwig wrote:
> Because it already is encoded in the opcode.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-merge.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/block/blk-merge.c b/block/blk-merge.c
> index e0b28e9298c9..64860cbd5e27 100644
> --- a/block/blk-merge.c
> +++ b/block/blk-merge.c
> @@ -864,9 +864,6 @@ static struct request *attempt_merge(struct request_queue *q,
> if (req_op(req) != req_op(next))
> return NULL;
>
> - if (rq_data_dir(req) != rq_data_dir(next))
> - return NULL;
> -
> if (req->bio && next->bio) {
> /* Don't merge requests with different write hints. */
> if (req->bio->bi_write_hint != next->bio->bi_write_hint)
> @@ -986,10 +983,6 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
> if (req_op(rq) != bio_op(bio))
> return false;
>
> - /* different data direction or already started, don't merge */
I tried to check what is meant by "already started", but that comment
pre-dates git. And even the code from then does not make it obvious, but
I don't want to check further, so:
Reviewed-by: John Garry <john.g.garry@oracle.com>
> - if (bio_data_dir(bio) != rq_data_dir(rq))
> - return false;
> -
> /* don't merge across cgroup boundaries */
> if (!blk_cgroup_mergeable(rq, bio))
> return false;
next prev parent reply other threads:[~2024-11-19 16:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 16:11 clean up bio merge conditions Christoph Hellwig
2024-11-19 16:11 ` [PATCH 1/2] block: don't bother checking the data direction for merges Christoph Hellwig
2024-11-19 16:48 ` John Garry [this message]
2024-11-19 16:49 ` Christoph Hellwig
2024-11-19 16:11 ` [PATCH 2/2] block: req->bio is always set in the merge code Christoph Hellwig
2024-11-19 16:59 ` John Garry
2024-11-19 16:36 ` clean up bio merge conditions Martin K. Petersen
2024-11-19 16:56 ` Johannes Thumshirn
2024-11-20 2:07 ` Jens Axboe
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=427189c2-dff8-4af8-a805-31d78019cc7b@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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.