Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4951806imu; Tue, 15 Jan 2019 08:40:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN4AG+gfk/1Ksn2MN+PsBH18zkguERqlxEICvn0V55LNLeh1L+7hJ0QS8K76xLNMnqy8zGlO X-Received: by 2002:a17:902:209:: with SMTP id 9mr5098579plc.288.1547570445913; Tue, 15 Jan 2019 08:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547570445; cv=none; d=google.com; s=arc-20160816; b=u1Mmqwhf3w3YTmexJeyXQMY93mEuO3NwMhL7zLAFP1BusZ4SVBfbVVnB+SobjW6rMB lZufTWe9TsizieZFypLG7dlZGFIKdKCA2B3DcCP29BS154juobriB72hyqKx4Ws+YWOA e7uiDkqd8iQvtGC5DzTs83Pxrx4wAYBUWEIHIW3Su+ZskCioz436I+wUYPjRoiJVQVz7 3cK5Vzf3t5QQ3KnKCvTtb3NLWdz8nnBEjGd6qy6tmFxEkiWWeLsTQO9TS1c/YB4RXkOB dc52rElQQczUE/Se32aIPG5CdZ4ufnyu4nuGYPP0NIBpbSghjVVZ93ITkxQ4ltMDS/Dz 3Fyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:reply-to:dkim-signature; bh=9nRDzFSapnRlPx9vKPqKnJm9H9JN9M+LXx5Bq0Oi5mw=; b=mnjmPLPtBCHBaaVNPAZv3MA4qhSJD3lkuzpzCsR9Ks+daG6iQY+0GCCK8x6winZmN9 ZwgA6rjanwim02YK21PjShFmWfcj0JXpAxxK+DGWooksiUIdq6UJfnr1Q4bbq5hHXgZO QsREmIUQTp+lkKKkeAmgYHlBdADgw1VR2StztxxgnBGGlg/1ZnN0QNnYLQ/meCzOWPLu pDY9FApZEESmn1FYuR2duMJvI1pX/yxHmGycbJw1JTgGiq9XNNBMhBr40wNft2f25b4X Hp/9T7RzQUa2qhj6mBGsDJoMNRj8LG/jWHnLSTnU21JX+7h29OLRwANkMbOtnC+g/wK3 WSzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b7QHJ5M8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l123si3688084pfc.187.2019.01.15.08.40.29; Tue, 15 Jan 2019 08:40:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b7QHJ5M8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730109AbfAOOZB (ORCPT + 99 others); Tue, 15 Jan 2019 09:25:01 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56145 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727574AbfAOOZA (ORCPT ); Tue, 15 Jan 2019 09:25:00 -0500 Received: by mail-wm1-f65.google.com with SMTP id y139so3438292wmc.5; Tue, 15 Jan 2019 06:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=9nRDzFSapnRlPx9vKPqKnJm9H9JN9M+LXx5Bq0Oi5mw=; b=b7QHJ5M8joEwFDoYEweN4y2EA0WwzBVMf77tVHvPPOW48hnB10iO8zebDiGxysNmev e60GtnLt7sRMs7siFQiXkk9HProEIpHvRFWd7kIRKQF3MiJIHXPsq7mJFBSeHuXL1Zf2 YvlTlRVw5CDJ6A5dM94kkxR9l9kUOIW9b7phvIjOdfZ/gCKSuV0zq3q8NIoLWqnUKMZP U3PU+4rehpQJmv5s+wgtne2DD4u92UE4VE9beXWly1ux0JCc97uyf8ZPS0zQX/QaGXVR QZZNmqBU/MIO/o03IDACm7fc5GpSxjY0kj1hz34UGJtYZoeuBOlGg5LOOw04kPZvegxo Kxcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=9nRDzFSapnRlPx9vKPqKnJm9H9JN9M+LXx5Bq0Oi5mw=; b=Ga9C6YB/vY4PIYXjjd6w6zupyHhLYhRrYaCvsSeq0LMfFb8HOrC2Rzv1WQNk/PQhLe BDdDfbF66xNM4+TpDoOVmoRz+VNWBumbU9LmDsqq7XGM2VfugwXajfpuBJmVYos57RuK WlxMBRuPF5woGLdM7ozybE1hcp85PF34R09VJmztHPoF+MioXhmElxthU6Xn290V1v/l UXJZwrIzRJsZsZ9+HRzGXeugz9kxFBBcBfoCEBKORJNFJUJWdEnqKL0vN19Tr3m9tUNW DtOXW62T3XOsXbT2w5ZsN5pMQcCYRtwPObvZXbEfuioiF57iyjU3T86gogNBErFjSUvV nq3g== X-Gm-Message-State: AJcUukdBLrZaFe+CG0y48A5/TFe0CJyzADXO4CGx3LIo5YJCAZHxFwvJ kE+/WhRWlSsbmplmg4zsMx/HNqrC X-Received: by 2002:a1c:2408:: with SMTP id k8mr3468340wmk.110.1547562297666; Tue, 15 Jan 2019 06:24:57 -0800 (PST) Received: from ?IPv6:2a02:908:1252:fb60:be8a:bd56:1f94:86e7? ([2a02:908:1252:fb60:be8a:bd56:1f94:86e7]) by smtp.gmail.com with ESMTPSA id j124sm22300980wmb.48.2019.01.15.06.24.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Jan 2019 06:24:57 -0800 (PST) Reply-To: christian.koenig@amd.com Subject: Re: [PATCH] lib/scatterlist: Provide a DMA page iterator To: Thomas Hellstrom , "hch@lst.de" , "jgg@ziepe.ca" Cc: "syeh@vmware.com" , "linux-rdma@vger.kernel.org" , "daniel.vetter@ffwll.ch" , "jian.xu.zheng@intel.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "sakari.ailus@linux.intel.com" , "bingbu.cao@intel.com" , "yong.zhi@intel.com" , "shiraz.saleem@intel.com" , "tian.shu.qiu@intel.com" , "linux-media@vger.kernel.org" References: <20190104223531.GA1705@ziepe.ca> <20190110234218.GM6890@ziepe.ca> <20190114094856.GB29604@lst.de> <1fb20ab4b171b281e9994b6c55734c120958530b.camel@vmware.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <2b440a3b-ed2f-8fd6-a21e-97ca0b2f5db9@gmail.com> Date: Tue, 15 Jan 2019 15:24:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1fb20ab4b171b281e9994b6c55734c120958530b.camel@vmware.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 15.01.19 um 15:17 schrieb Thomas Hellstrom: > Hi, Christoph, > > On Mon, 2019-01-14 at 10:48 +0100, Christoph Hellwig wrote: >> On Thu, Jan 10, 2019 at 04:42:18PM -0700, Jason Gunthorpe wrote: >>>> Changes since the RFC: >>>> - Rework vmwgfx too [CH] >>>> - Use a distinct type for the DMA page iterator [CH] >>>> - Do not have a #ifdef [CH] >>> ChristophH: Will you ack? >> This looks generally fine. >> >>> Are you still OK with the vmwgfx reworking, or should we go back to >>> the original version that didn't have the type safety so this >>> driver >>> can be left broken? >> I think the map method in vmgfx that just does virt_to_phys is >> pretty broken. Thomas, can you check if you see any performance >> difference with just doing the proper dma mapping, as that gets the >> driver out of interface abuse land? > The performance difference is not really the main problem here. The > problem is that even though we utilize the streaming DMA interface, we > use it only since we have to for DMA-Remapping and assume that the > memory is coherent. To be able to be as compliant as possible and ditch > the virt-to-phys mode, we *need* a DMA interface flag that tells us > when the dma_sync_for_xxx are no-ops. If they aren't we'll refuse to > load for now. I'm not sure, but I think also nouveau and radeon suffer > from the same issue. Yeah, indeed. Bounce buffers are an absolute no-go for GPUs. If the DMA API finds that a piece of memory is not directly accessible by the GPU we need to return an error and not try to use bounce buffers behind the surface. That is something which always annoyed me with the DMA API, which is otherwise rather cleanly defined. Christian. > >> While we're at it I think we need to merge my series in this area >> for 5.0, because without that the driver is already broken. Where >> should we merge it? > I can merge it through vmwgfx/drm-fixes. There is an outstanding issue > with patch 3. Do you want me to fix that up? > > Thanks, > Thomas > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel