Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844AbdHQOnK (ORCPT ); Thu, 17 Aug 2017 10:43:10 -0400 Received: from 8bytes.org ([81.169.241.247]:44426 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750857AbdHQOnJ (ORCPT ); Thu, 17 Aug 2017 10:43:09 -0400 Date: Thu, 17 Aug 2017 16:43:08 +0200 From: Joerg Roedel To: Alex Williamson Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Suravee Suthikulpanit Subject: Re: [PATCH 00/13] Introduce IOMMU-API TLB Flushing Interface Message-ID: <20170817144308.GI16908@8bytes.org> References: <1502974596-23835-1-git-send-email-joro@8bytes.org> <20170817083520.3329c0ff@w520.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170817083520.3329c0ff@w520.home> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 20 Hi Alex, On Thu, Aug 17, 2017 at 08:35:20AM -0600, Alex Williamson wrote: > Wouldn't it be much more friendly to downstreams and out-of-tree > drivers to introduce new functions for the async semantics? ie. > iommu_map_async(), etc. The API also seems a little cleaner that > iommu_map() stands alone, it's synchronous, iommu_map_async() is > explicitly asynchronous and a _flush() call is needed to finalize it. > What do you see as the advantage to the approach here? Thanks, The reason I did it this way was that I want the iommu_map(), iommu_unmap(), and iomu_map_sg() functions be considered the _default_ to chose when using the IOMMU-API, because their use is faster than using the _sync() variants. Or in other words, I want the _sync function names to imply that they are slower versions of the default ones. Regards, Joerg