Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5543844pxb; Tue, 16 Feb 2021 00:52:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJySmG+z9BDkX85Zh8eHlaUdV0ry9skGiWM9CWt8uL35o73wnSKdcOAec3FElzGx2kY/5pDp X-Received: by 2002:a17:906:7c4f:: with SMTP id g15mr506586ejp.184.1613465541434; Tue, 16 Feb 2021 00:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613465541; cv=none; d=google.com; s=arc-20160816; b=Szv3Eyw195eEtGsj4TeBJFk5moYHqktO8wibuoSG7lFGN60aJdX9VPQv0gqGkrHNlx rdl0o27Nnff3lPB155+BOyirBrNwn1t2AN4ohjxFQZljx4HWZRV9JfYWBVF05VezdAyR GXys6BFIq+BOeqRQH2kAJPhUGbXCzTxI7qaOg7muBbcvuBqkPsG5lRlcUetiIJn9mLDL OBOm4t86z6xwhSqq321sVZUqQMl8jHNSH//puaKuMRMG4dd1sOjfepQqDYcuikP47oCC +5v6i534ycmRe2goJqG7K/u4CV2VkCtL1GPJklyRx3RDAXCj63BfFFwmeulm2PhUT3NF Tbiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=DxjRJxink3V7YNrxdQE01+8t4PXTR+KxwF85839TO38=; b=XF2nRM/p2v+Z+Ox6v1mKwxTRwD4P1k+V9KrVrxs2lilSe7O9tICLbTDO4ai6JkPnCT N/seaDQ02AGJTcgRVLUpohLYmLEZ5u6azIBQmc5+ADY3GckoppiVNdMyVi1I5cTXfBvj quhIe99g81+k822VlKIyvn5I2Xkv9WW1igmsAPvufjTtD1hgFJHPWWmNJKtg3EttzkrO JrCHh+BeysL5mDDXea7zvaf1A70EEAk4Cgg2F8sBYuQSw04t7UwXxy8PXOq5L1StcdNE fle0HXZNKH5p4lp+Ai8cEb1t61Nd3cbpHBZcuRzgc1A8wJm3ZgHLc4I7UbwTGpp/YT7/ K9iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si14300747edy.32.2021.02.16.00.51.59; Tue, 16 Feb 2021 00:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbhBPIuc (ORCPT + 99 others); Tue, 16 Feb 2021 03:50:32 -0500 Received: from verein.lst.de ([213.95.11.211]:40399 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbhBPIu3 (ORCPT ); Tue, 16 Feb 2021 03:50:29 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 7CF7D6736F; Tue, 16 Feb 2021 09:49:47 +0100 (CET) Date: Tue, 16 Feb 2021 09:49:47 +0100 From: Christoph Hellwig To: Tomasz Figa Cc: Christoph Hellwig , Mauro Carvalho Chehab , Marek Szyprowski , Ricardo Ribalda , Sergey Senozhatsky , "open list:IOMMU DRIVERS" , Robin Murphy , Linux Doc Mailing List , Linux Kernel Mailing List , Linux Media Mailing List Subject: Re: [PATCH 6/7] dma-iommu: implement ->alloc_noncontiguous Message-ID: <20210216084947.GA23897@lst.de> References: <20210202095110.1215346-1-hch@lst.de> <20210202095110.1215346-7-hch@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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 16, 2021 at 05:14:55PM +0900, Tomasz Figa wrote: > When working on the videobuf2 integration with Sergey I noticed that > we always pass 0 as DMA attrs here, which removes the ability for > drivers to use DMA_ATTR_ALLOC_SINGLE_PAGES. > > It's quite important from a system stability point of view, because by > default the iommu_dma allocator would prefer big order allocations for > TLB locality reasons. For many devices, though, it doesn't really > affect the performance, because of random access patterns, so single > pages are good enough and reduce the risk of allocation failures or > latency due to fragmentation. > > Do you think we could add the attrs parameter to the > dma_alloc_noncontiguous() API? Yes, we could probably do that.