Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp987990imm; Fri, 27 Jul 2018 09:20:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfMIjzP7y3OYzokARY/50fXcZgIWvpTVRWoeLbO+SLzybzsB4vSZNsL75gwrKVQJyK5bao7 X-Received: by 2002:a17:902:5ac7:: with SMTP id g7-v6mr6609002plm.90.1532708402488; Fri, 27 Jul 2018 09:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532708402; cv=none; d=google.com; s=arc-20160816; b=F2W+PahSNlq1QJI/CmpW4jhQSI5orfct14cs8gJ7bCwxy5P49cyQ1T8hjX8Sp6aYby U4P/1ZOoO2ERDDTrT8b/eaCrPhDnUqmtseTI0UwBkxDuDn5vj1zjb8KA/rHAGXqO1P62 c+XviQYGD7BZ6SAe+fRbe6SZ2Br7Q0W0Xr8lnuxQveppHOvvSGqs2AOj+Rcnhlodw6IC C3sa/+9u+jrMLN46F1klFuHbHycO9ZT5kEA1fIx4aUtAdbIWikMCnFnR/SHOWUa81E4d 9Hz/KaAsp3syjO3vC0yXIRb/+G9J+im1HoLjmYzcCouGyQLRUj066o0RZUVqf3P47L3V ytFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=EtXmwgwBa3Va7b2EAL+01q1yHsMNxrZ0CPjz/20lA7c=; b=xDC7gP5T9IwpRxV09z/PvYiLh3n1dwjpfJwqVad5A6Zk2srGxdidEDR3FJml/4GKPB WYerkSsuqgBZIzuLONFALR+ZLzjjciN5qtvTVCmyoyuJRkqv8Ik7tm2Ll89h1oKmQRWZ +UeGrk0zvOYp5cFk3SawikyyAu4V01BoqXTCwOHBd9VjWVLmejYwwv5SxXfkCXl9WV8k An28CSuG7kW7MXeJ/6zcmKeYZl+VSP3J2RNXhfXKrjVlstGkR2BruesEFd24IIz8xqMO zzXxRZAOFTEk7uTYjcIG3bt2ATDYsPCDFIFhWZN1Z8AQkCpPPa8DFE1qXOtv82EtdKF0 NDbg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i13-v6si4013115pgi.277.2018.07.27.09.19.47; Fri, 27 Jul 2018 09:20:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731568AbeG0Rld (ORCPT + 99 others); Fri, 27 Jul 2018 13:41:33 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45872 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730205AbeG0Rld (ORCPT ); Fri, 27 Jul 2018 13:41:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16586ED1; Fri, 27 Jul 2018 09:18:57 -0700 (PDT) Received: from [10.4.12.131] (e110467-lin.emea.arm.com [10.4.12.131]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6CB8A3F6A8; Fri, 27 Jul 2018 09:18:55 -0700 (PDT) Subject: Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA To: Ganapatrao Kulkarni Cc: Ganapatrao Kulkarni , Joerg Roedel , iommu@lists.linux-foundation.org, LKML , tomasz.nowicki@cavium.com, jnair@caviumnetworks.com, Robert Richter , Vadim.Lomovtsev@cavium.com, Jan.Glauber@cavium.com References: <20180419171234.11053-1-ganapatrao.kulkarni@cavium.com> <3ed2046c-6912-9380-7ea4-4d921981c64c@arm.com> From: Robin Murphy Message-ID: <642cefaf-9ce7-bf0f-e6b6-e2e520e2427b@arm.com> Date: Fri, 27 Jul 2018 17:18:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/07/18 13:56, Ganapatrao Kulkarni wrote: [...] >>> did you get any chance to look in to this issue? >>> i am waiting for your suggestion/patch for this issue! >> >> >> I got as far as [1], but I wasn't sure how much I liked it, since it still >> seems a little invasive for such a specific case (plus I can't remember if >> it's actually been debugged or not). I think in the end I started wondering >> whether it's even worth bothering with the 32-bit optimisation for PCIe >> devices - 4 extra bytes worth of TLP is surely a lot less significant than >> every transaction taking up to 50% more bus cycles was for legacy PCI. > > how about tracking previous attempt to get 32bit range iova and avoid > further attempts, if it was failed. Later Resume attempts once > replenish happens. > Created patch for the same [2] Ooh, that's a much neater implementation of essentially the same concept - now why couldn't I think of that? :) Looks like it should be possible to make it entirely self-contained too, since alloc_iova() is in a position to both test and update the flag based on the limit_pfn passed in. Robin. > > [2] https://github.com/gpkulkarni/linux/commit/e2343a3e1f55cdeb5694103dd354bcb881dc65c3 > note, the testing of this patch is in progress. > >> >> Robin. >> >> [1] >> http://www.linux-arm.org/git?p=linux-rm.git;a=commitdiff;h=a8e0e4af10ebebb3669750e05bf0028e5bd6afe8 > > thanks > Ganapat >