Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3476280imm; Tue, 29 May 2018 07:55:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpLNJ1hY4+zcWJpTKBP2RkUIqfqd2gnExeSlceg1tWZ8874luo50SxpP3is3t+VhYpt3Ka4 X-Received: by 2002:a63:7315:: with SMTP id o21-v6mr14110948pgc.253.1527605721016; Tue, 29 May 2018 07:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527605720; cv=none; d=google.com; s=arc-20160816; b=pWgk/d4TEYYBC5/qzvF7uROqcPwHmvSs6+QDyL0DwXIp0U+bRV2iQ1sOBjyxtvWRiv kcb04PXxDLYGX0a/GJSeNvey+3pNYuRVBLJl5wRgrLtpYr2JisONoDAEcXAnXwneWyrr /8jKW38PjP7T5AzzNmpoB7IWKJFCG8oUdbMaBz6tAag9klTJpjG3J1vOI/rAvBXhvZQ6 Jjx6GVePvzZn64ElMA7LDMbij7Gxbcx59k6CzxQB21xX1IVBehqVV+SQOpRVzAGAfjRf AEBXKmU/nCZi2AGz1VC3W4BEkDd6rLuxi9vCRVGP5VbJwO8mVOPXxrlfh0WV16Iga3Ot +3ew== 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=vWPH1fb2TL7+c06t5Ntkl0pNGUq7W+gS6moqqPyN9Ak=; b=CdIpQJmM1HQrQruQazPDmHJRUJEfWBbBHTAMqaCzTlC+85OmCsFswxAOUoXuKlu0bL CwvoriZiRGKMVGvY98aRafphJXxggaJhXrwmjYXgXJcnpX3D/COzjZhUAzi1w3zrx/Yb tOUyCIJ/WDRuhHArtZ20uAF7BQXWHIhqEuQry5dtRExiLOG5oB+FNtNvCYRo4ZqF+Gr8 eA1FxvAOYduq/DepmJqSJ/FzEIjvmLd9zfpy/WBidifGykkZktr5zpDDCq8hKS9Rgtrv xiT4do3PrxR5MbFOXp42McrPFrEFElxE0DcgRrijELnx/NbgSJKYYSPx0b+bgXkwnTIY +qXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=fzx0sYqJ; 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 s86-v6si32859077pfd.288.2018.05.29.07.55.06; Tue, 29 May 2018 07:55:20 -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=fzx0sYqJ; 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 S936701AbeE2OyM (ORCPT + 99 others); Tue, 29 May 2018 10:54:12 -0400 Received: from 8bytes.org ([81.169.241.247]:57220 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936544AbeE2OyG (ORCPT ); Tue, 29 May 2018 10:54:06 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 3D394A8B; Tue, 29 May 2018 16:54:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1527605645; bh=rq9hJSoG9bfx15tUc8eH7e96JcftdRzuL5IdsZA1+qI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fzx0sYqJUH6clZ47jTxBllfC0igKFrnfCZR3ZHh7xwEmwV6XQbphMAi+lPzWVRG0u fqCGAVMGYIeWXj3WGUfGQ41bi/TaGrAxWMIpZWhZ2gvKoVQyKYVNb2YaGV1fkVogm8 hUkeVzs9SD1Y9+LPN7LOFZpZ0lwRPVp3SqKdhrO0dkqnnQKqzyMfZ6/0vR/TcUYGuO LGM4ZfNbz9FJgi2FVJDrajsMOJlO3vdvn7YHYI9SsWdib4nnkryBOkkzJqDE6Uhnmr N9vFLbpNKXo8okTuaYyx9VeFy+RABBmfoONoeP/FuIU5oz5uXhoyvc3g63AyBxKE03 w7ZU3fz4emzNQ== Date: Tue, 29 May 2018 16:54:05 +0200 From: Joerg Roedel To: Gary R Hook Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/amd - Optimize PPR log handling Message-ID: <20180529145405.GN18595@8bytes.org> References: <152668031618.108078.8188026193559324640.stgit@wsp141332wss.amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152668031618.108078.8188026193559324640.stgit@wsp141332wss.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 Hey Gary, On Fri, May 18, 2018 at 04:51:56PM -0500, Gary R Hook wrote: > Improve the performance of the PPR log polling function (i.e. the > task of emptying the log) by minimizing MMIO operations and more > efficiently processing groups of log entries. Cache the head > pointer, as there's never a reason to read it. Ensure the head > pointer register is updated every so often, to inform the IOMMU > that space is available in the log. > > Finally, since a single pass may leave logged events unread, use > an outer loop to repeat until head has caught up to tail. > > Signed-off-by: Gary R Hook Do you have numbers for the performance improvement? How did you test this patch? Regards, Joerg