Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp205218rdb; Sun, 28 Jan 2024 22:10:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDbwsHQwLrJ6cMBM9P/zYCoLRx36Cx9HWdRIcGUcDnZwNCi3bg4J576drB8bgp18H52mLd X-Received: by 2002:a05:6402:5208:b0:55e:ee49:b053 with SMTP id s8-20020a056402520800b0055eee49b053mr1983582edd.12.1706508607323; Sun, 28 Jan 2024 22:10:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706508607; cv=pass; d=google.com; s=arc-20160816; b=GeFkZxFq5wrU727Vm5LfJeX/YbJV4TP3S4RiSBR/jOZo66eXNWRt+X/5ubIBZ69sAc Vm944+MfRZSGVSR5MLPTShU+26/NMG5DnfvImUeOvT9e3T2uxDJsdlk+Kl8Ex57JMiiw VdgV9/kQRK1V96DdMepWIPYgmCtxqWKDDYk+9uuxWbqyiiuUNkDKTALTytLv/bTtAjvK wLJft516SBbW7pThgFWDhZgZ9Anq71Rb9x7WUzvFP5WJuB6rC2Ga0UsRxQ7QrNgU2tXS 8iVBKGxAqnL3bBI47rchpRlH+SmW0FnM/FyErNilLr5xz8i2LMA5gBo0ON68vh98GFIT XF/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=Imgh2nBh6R/ojH78Nycqq/HuvZRB818w1xkExQ+YvGw=; fh=oR31Ymep0FyVuVdca57olTv9eTg8LgsqYy30EaQNgmQ=; b=iWREOxfHwTteWxZhDDPYl5V6J1hO2mJRRbyevMVzmf6WIWYN1TNbCW6DYXt+hWv2jF 01Weg8YHSRwKFK1JbUKagoCWpXA+Mz1/MrHpnsZCw8RPq1sVAfZR8qWimdqgUk1ulDUD JgJfnZiT5eRskghc6PUarvT3UKfNjiN4HZKq0qp2caoSoH/xM5ek/N5f+ViRtVHfNvQP 32fUmP3EmAPK/Hoyov5CrkeZONaZ/0CQFQtyXVFaMPYNT2+B8N7O4Pp7aVlD36jUfpD3 6cNT0WIKggf5DN1sib1hR/kn4tUY/zGOIK14QkzjoJbH8LnYo8rFxwmG9VyaH7Tv+umc /1/A== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-42214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42214-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p29-20020a056402501d00b0055cccd35294si3282907eda.245.2024.01.28.22.10.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 22:10:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-42214-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42214-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 194231F22AD0 for ; Mon, 29 Jan 2024 06:10:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94E6F4C605; Mon, 29 Jan 2024 06:09:53 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B32FA4C60B; Mon, 29 Jan 2024 06:09:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706508593; cv=none; b=tv9uOq5Ofed8Mdqc4wszcO2MR+QL7lAiied1jbBXjlOmht7WsGGqOHMocu02zt+PlwOG9lf2Pv7IJTsQOJWWCcJe6FyTbbJaa6gebZXgfRj+9+PwrDuWsaRgmCrbq0s7z6JcEx2od5zN9Kox1O3goWVY9hZc8x6yWZPvebydfMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706508593; c=relaxed/simple; bh=fHF9zvpHCMx5CBMtV4x2qjE8Os/bWEdv7JcnskjEfj0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=peUa4pQWVYAQXXKW2d4nKE+GAufNFKrAwKSdLCbzJ6IxIFgfltjC0MrBQq8m3OXZu0J1kwIv3F56rRvTVCRwWFlgenUQ/MMcD8RM9aDmAJRCjSOSM4V0ff9BXSJrPDJ7mKrvEwixKoFTGms6Fp3vuTY+9xM2faINa3ETeYmWqrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id C292668B05; Mon, 29 Jan 2024 07:09:47 +0100 (CET) Date: Mon, 29 Jan 2024 07:09:47 +0100 From: Christoph Hellwig To: Robin Murphy Cc: Petr =?utf-8?B?VGVzYcWZw61r?= , Alexander Lobakin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christoph Hellwig , Marek Szyprowski , Joerg Roedel , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Magnus Karlsson , Maciej Fijalkowski , Alexander Duyck , bpf@vger.kernel.org, netdev@vger.kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/7] dma: avoid expensive redundant calls for sync operations Message-ID: <20240129060947.GC19258@lst.de> References: <20240126135456.704351-1-aleksander.lobakin@intel.com> <20240126135456.704351-3-aleksander.lobakin@intel.com> <0f6f550c-3eee-46dc-8c42-baceaa237610@arm.com> <7ff3cf5d-b3ff-4b52-9031-30a1cb71c0c9@intel.com> <0cf72c00-21d9-4f1a-be14-80336da5dff4@arm.com> <20240126194819.147cb4e2@meshulam.tesarici.cz> <1c62d388-a600-40d8-b386-15841cb1af95@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c62d388-a600-40d8-b386-15841cb1af95@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Jan 26, 2024 at 07:13:05PM +0000, Robin Murphy wrote: >> Can we have a comment that states this assumption along with the flag? >> Because when it breaks, it will keep someone cursing for days why DMA >> sometimes fails on their device before they find out it's not synced. >> And then wondering why the code makes such silly assumptions... > > Indeed, apologies if it wasn't totally clear, but I really was implying a > literal "may skip sync if coherent and not using SWIOTLB (which matches > dma-direct)" flag, documented as such, and not trying to dress it up as > anything more generic. I just can't suggest a suitably concise name for > that of the top of my head... :) Yes, that seems like the right way to go.