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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AE49C169C4 for ; Mon, 11 Feb 2019 16:01:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58D00218D8 for ; Mon, 11 Feb 2019 16:01:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pf0AsnJY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58D00218D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E//gttO9gqzRaCR7eJQsYmmu/kuRuodAqwK/pwDcCD0=; b=pf0AsnJYNHUPIm 01i6yKry2VrTWnQLdDK7lUn7rBS0hr+5P4Xsld0Q2Y/YZ+v8kHFvJEzRqz5bzRKW0Pa0xAZi2gMnB xnptWUkPTKtrrekVfIPrprDVgNHgi0Ve+R0RpjINwk/X9bFG8ZZQAb5L0gzp9f3VBzJj7gXmuXPyu O8bxD/nh4LYdp2g4LzFtg/C4QZOtyM4qz340TkS25UQzqFS9q3LfBuxJc3pAIZR72t1xKz94NzZLz Cu5qI2KC4AqGi3Q2suciYxsLbb1YokVerwrEdzgOZ/1cWSwUdn13tUJpfXtBkstl2x5ndd4h1io/M oHQKXvR47Fqtl2V3pPug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtE1P-0006B2-7N; Mon, 11 Feb 2019 16:01:27 +0000 Received: from verein.lst.de ([213.95.11.211] helo=newverein.lst.de) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtE0q-00068C-FP for linux-arm-kernel@lists.infradead.org; Mon, 11 Feb 2019 16:00:58 +0000 Received: by newverein.lst.de (Postfix, from userid 2407) id 19EF668DD6; Mon, 11 Feb 2019 17:00:50 +0100 (CET) Date: Mon, 11 Feb 2019 17:00:49 +0100 From: Christoph Hellwig To: Robin Murphy Subject: Re: [PATCH 03/19] dma-iommu: don't use a scatterlist in iommu_dma_alloc Message-ID: <20190211160049.GB27745@lst.de> References: <20190114094159.27326-1-hch@lst.de> <20190114094159.27326-4-hch@lst.de> <5145b2f7-6fc8-6ed9-4cf2-9b7e1d33b0fe@arm.com> <20190201161638.GJ6532@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190211_080052_664620_8D99CE5F X-CRM114-Status: GOOD ( 13.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , Catalin Marinas , Joerg Roedel , Will Deacon , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Christoph Hellwig , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 06, 2019 at 03:28:28PM +0000, Robin Murphy wrote: > Because if iommu_map() only gets called at PAGE_SIZE granularity, then the > IOMMU PTEs will be created at PAGE_SIZE (or smaller) granularity, so any > effort to get higher-order allocations matching larger IOMMU block sizes is > wasted, and we may as well have just done this: > > for (i = 0; i < count; i++) { > struct page *page = alloc_page(gfp); > ... > iommu_map(..., page_to_phys(page), PAGE_SIZE, ...); > } True. I've dropped this patch. > Really, it's a shame we have to split huge pages for the CPU remap, since > in the common case the CPU MMU will have a matching block size, but IIRC > there was something in vmap() or thereabouts that explicitly chokes on > them. That just needs a volunteer to fix the implementation, as there is no fundamental reason not to remap large pages. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel