Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp498726img; Fri, 22 Mar 2019 02:34:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1YrKRvRiaQNjcTThtuxq2ywiA5EeaBeVG1gGLjacIGjjPeI1nNeW2GvNqhdSMeCtCTne0 X-Received: by 2002:a65:4004:: with SMTP id f4mr8041381pgp.80.1553247253908; Fri, 22 Mar 2019 02:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553247253; cv=none; d=google.com; s=arc-20160816; b=dx/qUeheBZiBVtaiXIQ2cPVd9DLc0LykRpirblcQnLF2k6MeEMgqjfjz3vwDhOtOEl TOTfEL0aax4y46A8Gg1ZsS0EItuwfq7peSBBQsf1oFa30ohqzLwaBLeBxbDKMbqgcnPO TDx7MV2hkq8Wu6SC+vx2159u26OvVkwcNs415PzNV8NPYku34wDv71RD8AYcSsFxxdT9 XxueWdDBvS3QvccHBuOPghLdOmOavTpgtUG9iK1SQ3pJvJyGbfdqkx/OVy0RZm2CmC3+ zWk1wGHlbOm1smjeWkKsGSVNVgOZkneU2O7/lrZNVH2V0+kQvs+VUQC6hn3OF5U+BIF9 7zKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6WVBJNTfeT+DaaS6XkovsL/UpO5isc9tT9TiDPtndPs=; b=U4hVMH9WBWyp3ov2RCYnin1lDMYkAMSdbRacE2uPXP7ojvHj3sascsX90M1FhgXOb1 SV9dTmuO1pMwIsoQh31rEID1xOSdcFEh8uHF8HHurXz0dbIur/gNxiy3jwxYDZNOZ/AQ lRKYXCYDxiVQARnx4iB89ewaTwZJUQ1bXjMtTAadmbaWu4d0EhRd3E5QUpuLAqXQWefI +3W0d1zG0YE1lfyaxHqH+dNEcI1zcdb0YJ8DGhpCtA+3mX04xaHeq9YPm6X0+dp3FsaD wQQEpYhlx4AyVQFtLCA//unlLkaZKpf+m1unNfERl8urvGe99kDeurI3OyItPFhefj37 4jBg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o24si6113202pgk.41.2019.03.22.02.33.57; Fri, 22 Mar 2019 02:34:13 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727877AbfCVJbu (ORCPT + 99 others); Fri, 22 Mar 2019 05:31:50 -0400 Received: from 8bytes.org ([81.169.241.247]:58562 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727713AbfCVJbu (ORCPT ); Fri, 22 Mar 2019 05:31:50 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 1FB592D8; Fri, 22 Mar 2019 10:31:48 +0100 (CET) Date: Fri, 22 Mar 2019 10:31:46 +0100 From: Joerg Roedel To: Robert Richter Cc: Robin Murphy , Ganapatrao Kulkarni , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2] iommu/iova: Fix tracking of recently failed iova address Message-ID: <20190322093146.GA18669@8bytes.org> References: <20190315155553.11857-1-rrichter@marvell.com> <7515342b-f4b2-9406-5249-93ae7880835a@arm.com> <20190320185718.jhr6gvs7jdbn4x3p@rric.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190320185718.jhr6gvs7jdbn4x3p@rric.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 06:57:23PM +0000, Robert Richter wrote: > From: Robert Richter > Subject: [PATCH v2] iommu/iova: Fix tracking of recently failed iova address > size > > If a 32 bit allocation request is too big to possibly succeed, it > early exits with a failure and then should never update max32_alloc_ > size. This patch fixes current code, now the size is only updated if > the slow path failed while walking the tree. Without the fix the > allocation may enter the slow path again even if there was a failure > before of a request with the same or a smaller size. > > Cc: # 4.20+ > Fixes: bee60e94a1e2 ("iommu/iova: Optimise attempts to allocate iova from 32bit address range") > Signed-off-by: Robert Richter > Reviewed-by: Robin Murphy > Signed-off-by: Robert Richter > --- > drivers/iommu/iova.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Applied, thanks.