Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4237824pxb; Tue, 17 Nov 2020 15:26:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjAITFNkgPUmsG4J9RPVrEGf5mjhN0ZgB8tPpRw92rzqC+7p/XQL5pefYE8se1Er8fTNbL X-Received: by 2002:a05:6402:370:: with SMTP id s16mr22362965edw.50.1605655580410; Tue, 17 Nov 2020 15:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605655580; cv=none; d=google.com; s=arc-20160816; b=dt3YYCEaZJYJUXGuBtWqqfTFb4nwQLoXntMsp32yygM3sbWCL8vqwtJPzlkeQdj8UJ dy9qgrVSwW41dqGp17TSyueCPxosyyCpN2YLDpxehjDWvMuAQXRDoY01GAqrdpKK2M0y 37l71kK3cCKjy+cj1hLnyVxVHA3V5/b7PbThNPjKBfSoPNwqr6swGeY9E9o3z4wnsbsi e/sltzO5udsZKkf/sj0s0yYmmY7bdynR8L88hNMzobHbZWDVtKMavgMmJN9ci2Mvrpy9 1DSxV1U4xdAYDvrJqY8B382MDui4Xg9usXZUM13l38pyZRUBzIVfwlm9zuG5FeDaqE3I ZYXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N5HgpjIrdn3GSwzDZRf9GQ7tlxC+9zUJTku77K5oRSs=; b=k8Um4WumI7SDAA8jHLxYef3i8pcXLOJN+L9LifmpxecVUzFc9LcPiHwKkLn4zYutsQ VP1O4wGpfug815hL6zAqe1p6b6t17gH64mfj/cCK+J8HuWGhCh5+Lvypa7orMd0WWiUm 2igHu0iBzdCIpUNszlb7/NcHy+5muRp3mc1y8aoYtxqUn2NizksFlW8Yz5lMkxKd/GtR c8dNjtrtTcIs2QijeXQldH1Sb2Oc+38+tzZfBSKksmZQ2zHfSdeZuAzwgC4ldfcEHyLb K0YzffoOFkK42U+1iNPy/lkoZnv/uL3FxzuDHuRF9JirD22Tcsq2lxUrQ+AXXGtI3LnA Y+qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bN2fZGAX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si15213919edw.72.2020.11.17.15.25.58; Tue, 17 Nov 2020 15:26:20 -0800 (PST) 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=@kernel.org header.s=default header.b=bN2fZGAX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729826AbgKQXYl (ORCPT + 99 others); Tue, 17 Nov 2020 18:24:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:55858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728193AbgKQXYk (ORCPT ); Tue, 17 Nov 2020 18:24:40 -0500 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A976421D91; Tue, 17 Nov 2020 23:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605655480; bh=qYz2LNdZNi0aiX1wyp0QjexK42xd/yudcPZ60Vwb+1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bN2fZGAXDDeG9uCBKlptr8v/nlDi28S7SdjahoRESEKjcT9h9nSguvM/TbqXNTjuh hFYdRL/I28utCz99QExXTv/DFtQSJ888jdQnt0tzsVNERU0mtu2YnPa0Wx12teFyXr k3xSvkO0maYh/nxhg4ba+S0jfWwS91Wwdwg1pQgQ= From: Will Deacon To: "vjitta@codeaurora.org" , joro@8bytes.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Cc: catalin.marinas@arm.com, kernel-team@android.com, Will Deacon , robin.murphy@arm.com, vinmenon@codeaurora.org Subject: Re: [PATCH v5 1/2] iommu/iova: Retry from last rb tree node if iova search fails Date: Tue, 17 Nov 2020 23:24:29 +0000 Message-Id: <160565419447.2778079.10643367410535150698.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <1601451864-5956-1-git-send-email-vjitta@codeaurora.org> References: <1601451864-5956-1-git-send-email-vjitta@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 30 Sep 2020 13:14:23 +0530, vjitta@codeaurora.org wrote: > When ever a new iova alloc request comes iova is always searched > from the cached node and the nodes which are previous to cached > node. So, even if there is free iova space available in the nodes > which are next to the cached node iova allocation can still fail > because of this approach. > > Consider the following sequence of iova alloc and frees on > 1GB of iova space > > [...] Applied to arm64 (for-next/iommu/iova), thanks! [1/2] iommu/iova: Retry from last rb tree node if iova search fails https://git.kernel.org/arm64/c/4e89dce72521 [2/2] iommu/iova: Free global iova rcache on iova alloc failure https://git.kernel.org/arm64/c/6fa3525b455a Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev