From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it1-f196.google.com ([209.85.166.196]:40602 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727334AbeJRW2s (ORCPT ); Thu, 18 Oct 2018 18:28:48 -0400 Received: by mail-it1-f196.google.com with SMTP id i191-v6so543598iti.5 for ; Thu, 18 Oct 2018 07:27:32 -0700 (PDT) Subject: Re: [PATCH 1/5] block: warn on un-aligned DMA IO buffer To: Ming Lei Cc: linux-block@vger.kernel.org, Vitaly Kuznetsov , Dave Chinner , Linux FS Devel , "Darrick J . Wong" , xfs@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Matthew Wilcox References: <20181018131817.11813-1-ming.lei@redhat.com> <20181018131817.11813-2-ming.lei@redhat.com> From: Jens Axboe Message-ID: Date: Thu, 18 Oct 2018 08:27:28 -0600 MIME-Version: 1.0 In-Reply-To: <20181018131817.11813-2-ming.lei@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 generic_make_request_checks(). > > This patch addes one WARN in blk_queue_split() for capturing this issue. I don't want to do this, because then we are forever doomed to have something that fully loops a bio at submission time. I absolutely hate the splitting we have and the need for it, hopefully it can go away for a subset of IOs at some point. In many ways, this seems to be somewhat of a made-up problem, I don't recall a single bug report for something like this over decades of working with the IO stack. 512b alignment restrictions for DMA seems absolutely insane. I know people claim they exist, but clearly that isn't a hard requirement or we would have been boned years ago. -- Jens Axboe