From: Asias He <asias@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Tejun Heo <tj@kernel.org>, Shaohua Li <shli@kernel.org>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH RFC 1/2] block: Add blk_bio_map_sg() helper
Date: Thu, 14 Jun 2012 16:19:46 +0800 [thread overview]
Message-ID: <4FD99EA2.5010608@redhat.com> (raw)
In-Reply-To: <4FD992F7.5050800@kernel.dk>
On 06/14/2012 03:29 PM, Jens Axboe wrote:
> On 2012-06-14 04:31, Tejun Heo wrote:
>> On Wed, Jun 13, 2012 at 03:41:46PM +0800, Asias He wrote:
>>> Add a helper to map a bio to a scatterlist, modelled after
>>> blk_rq_map_sg.
>>>
>>> This helper is useful for any driver that wants to create
>>> a scatterlist from its ->make_request_fn method.
>>
>> This may not be possible but I really wanna avoid having two copies of
>> that complex logic. Any chance blk_rq_map_bio() can be implemented in
>> a way that allows blk_rq_map_sg() can be built on top of it? Also,
>
> Was thinking the same thing, definitely code we don't want to have
> duplicated. We've had mapping bugs in the past.
>
> Asias, this should be trivial to do, except that blk_rq_map_sg()
> potentially maps across bio's as well. The tracking of the prev bio_vec
> does not care about cross bio boundaries.
Sure. I will try this and send v2.
--
Asias
WARNING: multiple messages have this Message-ID (diff)
From: Asias He <asias@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Tejun Heo <tj@kernel.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Shaohua Li <shli@kernel.org>, Christoph Hellwig <hch@lst.de>,
Minchan Kim <minchan.kim@gmail.com>
Subject: Re: [PATCH RFC 1/2] block: Add blk_bio_map_sg() helper
Date: Thu, 14 Jun 2012 16:19:46 +0800 [thread overview]
Message-ID: <4FD99EA2.5010608@redhat.com> (raw)
In-Reply-To: <4FD992F7.5050800@kernel.dk>
On 06/14/2012 03:29 PM, Jens Axboe wrote:
> On 2012-06-14 04:31, Tejun Heo wrote:
>> On Wed, Jun 13, 2012 at 03:41:46PM +0800, Asias He wrote:
>>> Add a helper to map a bio to a scatterlist, modelled after
>>> blk_rq_map_sg.
>>>
>>> This helper is useful for any driver that wants to create
>>> a scatterlist from its ->make_request_fn method.
>>
>> This may not be possible but I really wanna avoid having two copies of
>> that complex logic. Any chance blk_rq_map_bio() can be implemented in
>> a way that allows blk_rq_map_sg() can be built on top of it? Also,
>
> Was thinking the same thing, definitely code we don't want to have
> duplicated. We've had mapping bugs in the past.
>
> Asias, this should be trivial to do, except that blk_rq_map_sg()
> potentially maps across bio's as well. The tracking of the prev bio_vec
> does not care about cross bio boundaries.
Sure. I will try this and send v2.
--
Asias
next prev parent reply other threads:[~2012-06-14 8:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 7:41 [PATCH RFC 0/2] Improve virtio-blk performance Asias He
2012-06-13 7:41 ` [PATCH RFC 1/2] block: Add blk_bio_map_sg() helper Asias He
2012-06-13 7:41 ` Asias He
2012-06-14 2:31 ` Tejun Heo
2012-06-14 2:31 ` Tejun Heo
2012-06-14 2:57 ` Asias He
2012-06-14 2:57 ` Asias He
2012-06-14 7:29 ` Jens Axboe
2012-06-14 7:29 ` Jens Axboe
2012-06-14 8:19 ` Asias He [this message]
2012-06-14 8:19 ` Asias He
2012-06-13 7:41 ` [PATCH RFC 2/2] virtio-blk: Add bio-based IO path for virtio-blk Asias He
2012-06-13 7:41 ` Asias He
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=4FD99EA2.5010608@redhat.com \
--to=asias@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@kernel.org \
--cc=tj@kernel.org \
--cc=virtualization@lists.linux-foundation.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.