From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 E0574374E53; Tue, 3 Mar 2026 03:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772510173; cv=none; b=ug3ttUSNEcU013uDOXNDkWew+EeDrZwDgVee6LYF1R6kXfS3R3lwAanABnL1bb49FReYf1yZbBS5fcZ66+ql3p7Tv+CXYuvQuShREnrtXALDzDuyoM5ddptGwsrM818kynfElMwOsas0+QuF2DXcdW9qZUUU4tq89/CfhfZzh1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772510173; c=relaxed/simple; bh=pTRMXOqv/m12tVZf+EaPFgocMeBqJC8gRpiDEzFf+h4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=I6r6kJz5+Rk/XniBTohApGyXwXlgFhQUWyqiANcr+eVp72xNDs+GQwhJ3y2CdzTjyV0y2czU8aS5yMP6APoELlHr2Q2mnwOv9j7jeeX6o24uqhwd+3L6UkfBEH7xvCKpqCZONkESEHHdeBo1aRkuNccIeVLgJTj/kZNIIUG7+ds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PVRMNQZo; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PVRMNQZo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772510172; x=1804046172; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=pTRMXOqv/m12tVZf+EaPFgocMeBqJC8gRpiDEzFf+h4=; b=PVRMNQZoTH4XRRtrLeFrElVWm0sz8I1TMV7I/bpGOrNx72N5ITQTpsQD J1uea6J+1PWlydhTqaUAPUDMZIAITOUCMAH14/Vsgus5IypDtZcpK3XGN kNF8xlsbPeDGvlBN6C5iEBiMpfP7N134GkTJGCa83Fcmqbei16hNXzEd6 EbfSggud0q3cE5MgREDbemZmqxqdK2jeurZyXnK7JRn+SqN0bd2Srld2m RaMp6RHSzpxlmddbXaoPrLIv+LXpUbjiD6WcdL8Vu/UHGzzPTlE9o/Fb9 0I54i8eZUtru+aNlIvzrqxgPPoEP3dgj68G0R8fpZErIRiZy19dQRjMh2 A==; X-CSE-ConnectionGUID: QLBhrd+6RzqUURN5q6iX4w== X-CSE-MsgGUID: K0X+SfajRKm1H/BBngqdgQ== X-IronPort-AV: E=McAfee;i="6800,10657,11717"; a="72561674" X-IronPort-AV: E=Sophos;i="6.21,321,1763452800"; d="scan'208";a="72561674" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2026 19:56:11 -0800 X-CSE-ConnectionGUID: 3D73I5kTRS+Fznyg54sTTQ== X-CSE-MsgGUID: yHUzzBkqTQOFvHOdoLI3/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,321,1763452800"; d="scan'208";a="217858409" Received: from allen-sbox.sh.intel.com (HELO [10.239.159.30]) ([10.239.159.30]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2026 19:56:09 -0800 Message-ID: Date: Tue, 3 Mar 2026 11:55:33 +0800 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iommupt: Optimize the gather processing for DMA-FQ mode To: Jason Gunthorpe , iommu@lists.linux.dev, Joerg Roedel , Will Deacon Cc: patches@lists.linux.dev, Robin Murphy References: <0-v1-37d146e56632+ce4-iommupt_no_gaps_fq_jgg@nvidia.com> Content-Language: en-US From: Baolu Lu In-Reply-To: <0-v1-37d146e56632+ce4-iommupt_no_gaps_fq_jgg@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/27/26 23:27, Jason Gunthorpe wrote: > In PT_FEAT_FLUSH_RANGE mode the gather was accumulated but never flushed > and then the accumulated range was discarded by the dma-iommu code in > DMA-FQ mode. This is basically optimal. > > However for PT_FEAT_FLUSH_RANGE_NO_GAPS the page table would push flushes > that are redundant with the flush all generated by the DMA-FQ mode. > > Disable all range accumulation in the gather, and iommu_pt triggered > flushing when in iommu_iotlb_gather_queued() indicates it is in DMA-FQ > mode. > > Reported-by: Robin Murphy > Closes:https://lore.kernel.org/r/794b6121-b66b-4819-b291-9761ed21cd83@arm.com > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/generic_pt/iommu_pt.h | 27 +++++++++++++++++++-------- > 1 file changed, 19 insertions(+), 8 deletions(-) Reviewed-by: Lu Baolu