Re: [dm-devel] [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Sat, Sep 08, 2012 at 12:14:33AM +0100, Alasdair G Kergon wrote: > As I indicated already in this discussion, dm started to use > merge_bvec_fn as a cheap way of avoiding splitting and this improved > overall efficiency. Often it's better to pay the small price of calling > that function to

Re: [dm-devel] [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Alasdair G Kergon
As I indicated already in this discussion, dm started to use merge_bvec_fn as a cheap way of avoiding splitting and this improved overall efficiency. Often it's better to pay the small price of calling that function to ensure the bio is created the right size in the first place so it won't have

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 16:25, Kent Overstreet wrote: > On Fri, Sep 07, 2012 at 04:06:45PM -0600, Jens Axboe wrote: >> On 2012-09-07 15:55, Jens Axboe wrote: >>> On 2012-09-07 14:58, Kent Overstreet wrote: On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: > On 2012-09-06 16:34, Kent

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Fri, Sep 07, 2012 at 04:06:45PM -0600, Jens Axboe wrote: > On 2012-09-07 15:55, Jens Axboe wrote: > > On 2012-09-07 14:58, Kent Overstreet wrote: > >> On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: > >>> On 2012-09-06 16:34, Kent Overstreet wrote: > Reusing bios is something

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 15:55, Jens Axboe wrote: > On 2012-09-07 14:58, Kent Overstreet wrote: >> On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: >>> On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been highly frowned upon in the past, but driver code keeps

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 14:58, Kent Overstreet wrote: > On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: >> On 2012-09-06 16:34, Kent Overstreet wrote: >>> Reusing bios is something that's been highly frowned upon in the past, >>> but driver code keeps doing it anyways. If it's going to happen

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: > On 2012-09-06 16:34, Kent Overstreet wrote: > > Reusing bios is something that's been highly frowned upon in the past, > > but driver code keeps doing it anyways. If it's going to happen anyways, > > we should provide a generic method.

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it anyways. If it's going to happen anyways, we should provide a generic method.

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 14:58, Kent Overstreet wrote: On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it anyways. If it's going to happen anyways,

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 15:55, Jens Axboe wrote: On 2012-09-07 14:58, Kent Overstreet wrote: On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Fri, Sep 07, 2012 at 04:06:45PM -0600, Jens Axboe wrote: On 2012-09-07 15:55, Jens Axboe wrote: On 2012-09-07 14:58, Kent Overstreet wrote: On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Jens Axboe
On 2012-09-07 16:25, Kent Overstreet wrote: On Fri, Sep 07, 2012 at 04:06:45PM -0600, Jens Axboe wrote: On 2012-09-07 15:55, Jens Axboe wrote: On 2012-09-07 14:58, Kent Overstreet wrote: On Thu, Sep 06, 2012 at 07:34:18PM -0600, Jens Axboe wrote: On 2012-09-06 16:34, Kent Overstreet wrote:

Re: [dm-devel] [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Alasdair G Kergon
As I indicated already in this discussion, dm started to use merge_bvec_fn as a cheap way of avoiding splitting and this improved overall efficiency. Often it's better to pay the small price of calling that function to ensure the bio is created the right size in the first place so it won't have

Re: [dm-devel] [PATCH v10 4/8] block: Add bio_reset()

2012-09-07 Thread Kent Overstreet
On Sat, Sep 08, 2012 at 12:14:33AM +0100, Alasdair G Kergon wrote: As I indicated already in this discussion, dm started to use merge_bvec_fn as a cheap way of avoiding splitting and this improved overall efficiency. Often it's better to pay the small price of calling that function to ensure

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-06 Thread Jens Axboe
On 2012-09-06 16:34, Kent Overstreet wrote: > Reusing bios is something that's been highly frowned upon in the past, > but driver code keeps doing it anyways. If it's going to happen anyways, > we should provide a generic method. > > This'll help with getting rid of bi_destructor -

[PATCH v10 4/8] block: Add bio_reset()

2012-09-06 Thread Kent Overstreet
Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it anyways. If it's going to happen anyways, we should provide a generic method. This'll help with getting rid of bi_destructor - drivers/block/pktcdvd.c was open coding it, by doing a bio_init()

[PATCH v10 4/8] block: Add bio_reset()

2012-09-06 Thread Kent Overstreet
Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it anyways. If it's going to happen anyways, we should provide a generic method. This'll help with getting rid of bi_destructor - drivers/block/pktcdvd.c was open coding it, by doing a bio_init()

Re: [PATCH v10 4/8] block: Add bio_reset()

2012-09-06 Thread Jens Axboe
On 2012-09-06 16:34, Kent Overstreet wrote: Reusing bios is something that's been highly frowned upon in the past, but driver code keeps doing it anyways. If it's going to happen anyways, we should provide a generic method. This'll help with getting rid of bi_destructor -