From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38B5DC433F5 for ; Tue, 22 Feb 2022 13:16:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 779738D0002; Tue, 22 Feb 2022 08:16:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 72A448D0001; Tue, 22 Feb 2022 08:16:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F40E8D0002; Tue, 22 Feb 2022 08:16:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 517878D0001 for ; Tue, 22 Feb 2022 08:16:17 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0561B9F5C7 for ; Tue, 22 Feb 2022 13:16:17 +0000 (UTC) X-FDA: 79170464394.22.042F71A Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf13.hostedemail.com (Postfix) with ESMTP id 82FBD20009 for ; Tue, 22 Feb 2022 13:16:16 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id C982468BEB; Tue, 22 Feb 2022 14:16:10 +0100 (CET) Date: Tue, 22 Feb 2022 14:16:10 +0100 From: 'Christoph Hellwig' To: David Laight Cc: 'Christoph Hellwig' , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Baoquan He , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "cl@linux.com" , "penberg@kernel.org" , "rientjes@google.com" , "iamjoonsoo.kim@lge.com" , "vbabka@suse.cz" , "david@redhat.com" , "herbert@gondor.apana.org.au" , "davem@davemloft.net" , "linux-crypto@vger.kernel.org" , "steffen.klassert@secunet.com" , "netdev@vger.kernel.org" , "hca@linux.ibm.com" , "gor@linux.ibm.com" , "agordeev@linux.ibm.com" , "borntraeger@linux.ibm.com" , "svens@linux.ibm.com" , "linux-s390@vger.kernel.org" , "michael@walle.cc" , "linux-i2c@vger.kernel.org" , "wsa@kernel.org" Subject: Re: [PATCH 22/22] mtd: rawnand: Use dma_alloc_noncoherent() for dma buffer Message-ID: <20220222131610.GA10464@lst.de> References: <20220219005221.634-1-bhe@redhat.com> <20220219005221.634-23-bhe@redhat.com> <20220219071900.GH26711@lst.de> <20220222084652.GB6210@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=none; spf=none (imf13.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 82FBD20009 X-Stat-Signature: myh4hp4reccm8o1fnbtuu5ekmjq5pxmr X-HE-Tag: 1645535776-250542 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 22, 2022 at 09:06:48AM +0000, David Laight wrote: > From: Christoph Hellwig > > Sent: 22 February 2022 08:47 > ... > > > Hmm.. for this specific case, What about allocating two buffers > > > for DMA_TO_DEVICE and DMA_FROM_DEVICE at initialization time? > > > > That will work, but I don't see the benefit as you'd still need to call > > dma_sync_single* before and after each data transfer. > > For systems with an iommu that should save all the iommu setup > for every transfer. So does allocating a single buffer as in the patch we are replying to.