Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4089847imm; Tue, 29 May 2018 21:54:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI2XLChZV3EUyrkhxudqe70tdDn7ee7VXvMGqZtIKiqSHf9eH8lgypZp+22pBWaJW6AEanY X-Received: by 2002:a17:902:54d:: with SMTP id 71-v6mr1301682plf.365.1527656042949; Tue, 29 May 2018 21:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527656042; cv=none; d=google.com; s=arc-20160816; b=uKaugAcWP6TJTmiQoqCE1LwC2IIlAsfPVvaAa8bSKxHXNKaumVNIXUhAzx8tQJkYQD E9gdh5RuzOrUeiOstSqn2J85U1BS4kwD4r+Es1ClU3QNppKhtLTJrYPru365W/EVbjc9 dyTMZP9p1e8UehMlK2p9cF5RX0JV7peo0sV+UgWaV+/k2spaWiHLrngYaAX9lJUt0KXv lM2PujglFJIHwajo6QYeNY4PMq4EYHssyzpus58ImQ6umPCpXRWEwPDURSJ5rw1xrQ8A eHKu5g1wCFnX0YvOMXxTN0uhZ4ub3MiZDA7Vodh+FDS8ZPVuM4HcLRbWJI4/znB8xIQ1 IJug== 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:dkim-signature:arc-authentication-results; bh=cLfmO7fSJvM6LHNSMBk41Mrd10FPg4AjrM1OWe897CA=; b=beF5lYj1LN0OhD9TX14MKcVzpY2UtpqOXVzByMnJsr7iePaL3w2XxYHzWWt2QULfHu EuRaqP65HxuyvNvExC8fgT5tebmfM4TGJO5HM2KLgUkWRIkEsyt0uFXnd/x4mvz3jtIF 9rF0Qnh61OqYQpy4qWEuqgnoK7mVXPJs3FToUDHNQUdgjkoda6b8015ZelNbhViM2xq/ xYjlrvZhlQ7POL64SHE6isDT6ENR9AjndAq2IFJB2ehhCtjukzzLOFeYOJWtTgQKhTJg 5i9Z/Wd4cF0FLkkSiRAoPYmplo7QkFV26CN967T7/o6Dr4NB23ps3OTS8+sMouQEY8m1 JE7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=WhmHiuc/; 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 n20-v6si17348213plp.298.2018.05.29.21.53.48; Tue, 29 May 2018 21:54: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; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=WhmHiuc/; 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 S935132AbeE3EwI (ORCPT + 99 others); Wed, 30 May 2018 00:52:08 -0400 Received: from 8bytes.org ([81.169.241.247]:41320 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbeE3EwF (ORCPT ); Wed, 30 May 2018 00:52:05 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 2A992978; Wed, 30 May 2018 06:52:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1527655924; bh=IEPEWBU9DtvRX/lt7jrt0+YHDm0QYUZ08dqfnUNANd8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WhmHiuc/gZ3Dn0AJTtLv42yYOkqlhR8xbjYIRPTgJOuN0A/5dew9vLJu00aQUHhqT h8m4WoPC20ShAlkbvhOgJYRq3xQf1GiUXNmlmV19YSUhqwB81be1tAFAQ9RvbFx2CO VQr91mzuzoc1am3a1WV6q20zv731u3aRUnu37KuqEdtDm7FRhM6EpqaEtSdFmBrVrk 5wlJ8gGj9gT2DTebYqtMnISb+MfQaQv3H5/ztlJLSDNgjKB6TzM2menuTNobP2gMpS 4wVMT4Q4EWvTTXHf1jHlVOziVLC92VCR9WQGTH1jIhR6u+gEe7h4L3/T18aNZkPx7+ f5FDvaNE9Q6tQ== Date: Wed, 30 May 2018 06:52:04 +0200 From: Joerg Roedel To: Gary R Hook Cc: Gary R Hook , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/amd - Optimize PPR log handling Message-ID: <20180530045203.GO18595@8bytes.org> References: <152668031618.108078.8188026193559324640.stgit@wsp141332wss.amd.com> <20180529145405.GN18595@8bytes.org> <223930b9-3df9-813a-6676-68072e4e1bb6@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <223930b9-3df9-813a-6676-68072e4e1bb6@amd.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 12:28:54PM -0500, Gary R Hook wrote: > No, no numbers. We're still working out how best to test this, and > suggestions/strategies are welcome. Maybe run a simple kernel on the CPU that does a memcpy on a larger portion of mmapped (but yet unmapped) process address space and measure the time it takes for the kernel to run. The page-fault path in the iommu-driver is only a small part of the involved code here, but maybe you already see a difference. Doing a u-benchmark only for that code is probably a bit more challenging. > The change is modeled after the function iommu_poll_events(), which is much > cleaner. The GA log handling should be changed, as well (there are > superfluous writes in the loop), but I figured, "one thing at a time". This > is admittedly a minor optimization, but discussions with Tom Lendacky have > led us down this path. > > Your feedback is appreciated. Yeah, the patch looks good to me from my first review. But since I can't test that code myself I was wondering if you did any tests and can share something with me to run my own tests :) Joerg