Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4011290pxb; Mon, 27 Sep 2021 07:34:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYuLB9el0vW9tM9hDLF2gtz7Hx3vZPBnmOwojJi2Zd9topmsB1+Ojw5kjdJlvtAHeLjzf+ X-Received: by 2002:a17:906:6b1a:: with SMTP id q26mr352222ejr.185.1632753263685; Mon, 27 Sep 2021 07:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632753263; cv=none; d=google.com; s=arc-20160816; b=P2EhqhOXAiaNS1GW3avDvLGF3/rr72g/+3r4bVsLOvjjxAwWqeENDIhNtzfNnNM0Re rcMnKf8jq9D9kqEXL8boxwtT/CeLWU3Z2khsAUR86mfMQLYRKQj0XmowBb09mF/Yk2Qu LAm8v/OPkSI79tngktClveTCGAC7AKpTwQSkU5ckgAI6Wqmf7V5PPXseGiqvnuNwz0Tc +4STuyUI6X6xhtFs1oDqf0mvGbytJ9XRZM9mjirjRUCDbSMOHTtCuPXGrvIrFP7ztAjn cvCbyopHUUYE7hwTJKImvS0tseY3syeEo7pfFKQSvC8QlF/mSWHfDYOynLALzFlUz7bW mQiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=orJGo1RuUFHCIf3obfYqUs4fubLhRP1M2sWxBbv1mU0=; b=eBDapwouv9SLLPNjp7r9H4O0zCJuKi3dblPAcyTQbzL4xmyB1MfcH88YNnpzZmcUQ5 hsKkseTh0rq3B+L1e9sWOgKhn/ai9vujpQzNCvJmLAbXTZBJOV2DVBvw5pksQ8nkw5mG A14KhmN/sINKzSAMiqr3kYsj5LZlL4keakTyI37VowtJSQgaj6mKEQE1aqUlT6dpDwHq 5R+Pg3+rmjY5AeRwQ9EoSHDSlw/BHRNFUZOniqwIvLhocQJkhwLjPtFTzq8k6rEIRX5+ X/LJNfQLacZjSuXXXu90qx9fK/sqXdRhfwGJOLuJHudvS2x9yKOfmDZekWw7rDY7XSWF dEgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ht+Sduz3; 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 i1si1018516ejo.756.2021.09.27.07.33.58; Mon, 27 Sep 2021 07:34:23 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ht+Sduz3; 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 S234813AbhI0OeG (ORCPT + 99 others); Mon, 27 Sep 2021 10:34:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234722AbhI0OeF (ORCPT ); Mon, 27 Sep 2021 10:34:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D809C061575; Mon, 27 Sep 2021 07:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=orJGo1RuUFHCIf3obfYqUs4fubLhRP1M2sWxBbv1mU0=; b=ht+Sduz34yQKStv2n3ObCtkKTF wEkl7m9tES10q3fvTT/ZgjHf++1D9neqPG10q/SCc4zYqu0m5zLSV9ElZvGW3FuN8ljAHf6lA50cv phHA/+Qm4chrVL+6hn18lr1fLTfMDp9yMES5q+R1dmQMqvmo2tfkRjoPoDcc7q4wTx6F/KvFOHeDJ IlgHfblRGAzSK8C8FEYPttOqNiw7gfmdcxrlT4xxsasLXsHSiL+Y9uJwkx50dM0KgQoXbXVLo8ktl fx6wcj2Ogr4H8nqkgkOJyfmK3VbJq+jylYRfpCTi55hRWBnd1jiuZ3O6IE0BygKeH7aunVZB9bUZz t3BJDHEw==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUreZ-009pcs-JC; Mon, 27 Sep 2021 14:31:29 +0000 Date: Mon, 27 Sep 2021 15:30:47 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Cai Huoqing , Mustafa Ismail , Shiraz Saleem , Doug Ledford , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] RDMA/irdma: Use dma_alloc_coherent() instead of kmalloc/dma_map_single() Message-ID: References: <20210926061124.335-1-caihuoqing@baidu.com> <20210927120235.GB3544071@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210927120235.GB3544071@ziepe.ca> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 09:02:35AM -0300, Jason Gunthorpe wrote: > This I'm not sure about, I see lots of calls to dma_sync_single_* for > this memory and it is not unconditionally true that using coherent > memory is better than doing the cache flushes. It depends very much > on the access pattern. > > At the very least if you convert to coherent memory I expect to see > the sync's removed too.. In general coherent memory actually is worse for not cache coherent architectures when you hav chance, an should mkae no difference for cache coherent ones. So I'd like to see numbers here instead of a claim.