Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Jens Axboe
On 10/18/18 8:06 PM, Ming Lei wrote: > On Thu, Oct 18, 2018 at 07:52:59PM -0600, Jens Axboe wrote: >> On 10/18/18 7:39 PM, Ming Lei wrote: >>> On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote: On 10/18/18 7:28 PM, Ming Lei wrote: > On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Ming Lei
On Thu, Oct 18, 2018 at 07:52:59PM -0600, Jens Axboe wrote: > On 10/18/18 7:39 PM, Ming Lei wrote: > > On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote: > >> On 10/18/18 7:28 PM, Ming Lei wrote: > >>> On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: > On 10/18/18 7:18 AM,

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Jens Axboe
On 10/18/18 7:39 PM, Ming Lei wrote: > On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote: >> On 10/18/18 7:28 PM, Ming Lei wrote: >>> On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: On 10/18/18 7:18 AM, Ming Lei wrote: > Now we only check if DMA IO buffer is aligned

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Ming Lei
On Thu, Oct 18, 2018 at 07:33:50PM -0600, Jens Axboe wrote: > On 10/18/18 7:28 PM, Ming Lei wrote: > > On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: > >> On 10/18/18 7:18 AM, Ming Lei wrote: > >>> Now we only check if DMA IO buffer is aligned to queue_dma_alignment() > >>> for

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Jens Axboe
On 10/18/18 7:28 PM, Ming Lei wrote: > On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: >> On 10/18/18 7:18 AM, Ming Lei wrote: >>> Now we only check if DMA IO buffer is aligned to queue_dma_alignment() >>> for pass-through request, and it isn't done for normal IO request. >>> >>> Given

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Ming Lei
On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: > On 10/18/18 7:18 AM, Ming Lei wrote: > > Now we only check if DMA IO buffer is aligned to queue_dma_alignment() > > for pass-through request, and it isn't done for normal IO request. > > > > Given the check has to be done on each bvec,

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Jens Axboe
On 10/18/18 8:43 AM, Christoph Hellwig wrote: > On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: >> On 10/18/18 7:18 AM, Ming Lei wrote: >>> Now we only check if DMA IO buffer is aligned to queue_dma_alignment() >>> for pass-through request, and it isn't done for normal IO request. >>>

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Christoph Hellwig
On Thu, Oct 18, 2018 at 08:27:28AM -0600, Jens Axboe wrote: > On 10/18/18 7:18 AM, Ming Lei wrote: > > Now we only check if DMA IO buffer is aligned to queue_dma_alignment() > > for pass-through request, and it isn't done for normal IO request. > > > > Given the check has to be done on each bvec,

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Christoph Hellwig
> diff --git a/block/blk-merge.c b/block/blk-merge.c > index 42a46744c11b..d2dbd508cb6d 100644 > --- a/block/blk-merge.c > +++ b/block/blk-merge.c > @@ -174,6 +174,8 @@ static struct bio *blk_bio_segment_split(struct > request_queue *q, > const unsigned max_sectors = get_max_io_size(q,

Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer

2018-10-18 Thread Jens Axboe
On 10/18/18 7:18 AM, Ming Lei wrote: > Now we only check if DMA IO buffer is aligned to queue_dma_alignment() > for pass-through request, and it isn't done for normal IO request. > > Given the check has to be done on each bvec, it isn't efficient to add the > check in