From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 1C8F08E0041 for ; Mon, 24 Sep 2018 16:41:55 -0400 (EDT) Received: by mail-pf1-f198.google.com with SMTP id j15-v6so10741123pfi.10 for ; Mon, 24 Sep 2018 13:41:55 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id o66-v6si288562pfb.125.2018.09.24.13.41.53 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Sep 2018 13:41:53 -0700 (PDT) Date: Mon, 24 Sep 2018 13:41:48 -0700 From: Matthew Wilcox Subject: Re: block: DMA alignment of IO buffer allocated from slab Message-ID: <20180924204148.GA2542@bombadil.infradead.org> References: <38c03920-0fd0-0a39-2a6e-70cd8cb4ef34@virtuozzo.com> <20a20568-5089-541d-3cee-546e549a0bc8@acm.org> <12eee877-affa-c822-c9d5-fda3aa0a50da@virtuozzo.com> <1537801706.195115.7.camel@acm.org> <1537804720.195115.9.camel@acm.org> <10c706fd-2252-f11b-312e-ae0d97d9a538@virtuozzo.com> <1537805984.195115.14.camel@acm.org> <20180924185753.GA32269@bombadil.infradead.org> <1537818978.195115.25.camel@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1537818978.195115.25.camel@acm.org> Sender: owner-linux-mm@kvack.org List-ID: To: Bart Van Assche Cc: Andrey Ryabinin , Ming Lei , Vitaly Kuznetsov , Christoph Hellwig , Ming Lei , linux-block , linux-mm , Linux FS Devel , "open list:XFS FILESYSTEM" , Dave Chinner , Linux Kernel Mailing List , Jens Axboe , Christoph Lameter , Linus Torvalds , Greg Kroah-Hartman On Mon, Sep 24, 2018 at 12:56:18PM -0700, Bart Van Assche wrote: > On Mon, 2018-09-24 at 11:57 -0700, Matthew Wilcox wrote: > > You're not supposed to use kmalloc memory for DMA. This is why we have > > dma_alloc_coherent() and friends. > > Are you claiming that all drivers that use DMA should use coherent DMA only? If > coherent DMA is the only DMA style that should be used, why do the following > function pointers exist in struct dma_map_ops? Good job snipping the part of my reply which addressed this. Go read DMA-API.txt yourself. Carefully.