From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 20 Sep 2018 08:32:26 +0200 From: Christoph Hellwig To: Ming Lei Cc: Vitaly Kuznetsov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Ming Lei , linux-block , linux-mm , Linux FS Devel , "open list:XFS FILESYSTEM" , Dave Chinner , Linux Kernel Mailing List , Christoph Hellwig , Jens Axboe Subject: Re: block: DMA alignment of IO buffer allocated from slab Message-ID: <20180920063226.GC12913@lst.de> References: <877ejh3jv0.fsf@vitty.brq.redhat.com> <20180919100256.GD23172@ming.t460p> <8736u53fij.fsf@vitty.brq.redhat.com> <20180920012836.GA27645@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180920012836.GA27645@ming.t460p> Sender: owner-linux-mm@kvack.org List-ID: On Thu, Sep 20, 2018 at 09:28:37AM +0800, Ming Lei wrote: > > has e.g. PAGE_SIZE alignment requirement (this would likely imply that > > it's sector size is also not 512 I guess)? > > Yeah, that can be true if one controller has 4k-byte sector size, also > its DMA alignment is 4K. But there shouldn't be cases in which the two > doesn't match. The general block storage worlds is that devices always need to have an alignment requirement <= minimum LBAs size. If they don't they'll need to bounce buffer (in the driver!).