From patchwork Wed Feb 22 15:25:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9587011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2CB536020B for ; Wed, 22 Feb 2017 15:25:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24CD828657 for ; Wed, 22 Feb 2017 15:25:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19E3D2865A; Wed, 22 Feb 2017 15:25:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA85628657 for ; Wed, 22 Feb 2017 15:25:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F02F56E83A; Wed, 22 Feb 2017 15:25:35 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id C345A6E83A for ; Wed, 22 Feb 2017 15:25:33 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id u63so1014252wmu.2 for ; Wed, 22 Feb 2017 07:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=cIMRmj0SHTXbSWD7pYSFy75uQlR183eynFzdtkcIPWA=; b=PfqosrivID3I+XXDyVLaXn9xV/3j4ZB1pbMq9aZ/CSkAkchWDFIOnnsRsq2gzdN9Na P+lj+Z/ljhMqnNujrpEjTC+adt7+4+Jk9Bd/KgGXG1YMtEeKbghns9xijdiObtR+wLmI wxQFRcqCMOQC7FViqqQf53GgG9i9QO2q2XRpbKEbSW9+fX6//BM2bfMcL+m4i7g+jX82 ZyvWiXoa/4F+N6m2tmcgDXFV7jShX8lUz8lrURZfQUGwSSaxpbYziiweZVLtm/EUmmQf 4tDe+SiNCGv4jsKnEy9jYEDIo6dgmJ3Nrg0dgLyc53U103Owx6cieZFhzyO8VofeBZC5 W2PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=cIMRmj0SHTXbSWD7pYSFy75uQlR183eynFzdtkcIPWA=; b=JigcOBBj3xbAWL/XQvXvP8uLD0eWltZYw5DeMQsjuWlqXblePnrIaQmzroc6nw6ljy lltv8t8XjX1KGn/jZSXW4n5pC8JrjnWUJ4kvarOfAUWuXoH+L/9g9kC2tiImlVESeglr KzaJZyM4jH8CjVN8+s3xqcDN9MmFn6+aUaf43gWdVNCiB1in2vbmVBxg47YMeMNOataz 1ndI3dTaSR40+d+1mtHpPBMnYt3gFbiSEn2uL/wgCbvz/MM49GQ3putFLSk/4wgWzmOx TjY1qyLOw0Gf3CO5UQu4uE59Hpg2uFGSuq0ZKU8g47byhoreU8LBErDK0LSduwW/viPZ 4ZJg== X-Gm-Message-State: AMke39miWFjHueCdTS746avCGlNfNQYLWiltmazsd63VtpczYOf2lQPTt3zXiNMUz6+ASQ== X-Received: by 10.28.54.195 with SMTP id y64mr2752446wmh.10.1487777132511; Wed, 22 Feb 2017 07:25:32 -0800 (PST) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by smtp.gmail.com with ESMTPSA id w17sm2148775wra.28.2017.02.22.07.25.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 07:25:32 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Wed, 22 Feb 2017 15:25:10 +0000 Message-Id: <20170222152510.5039-4-robert@sixbynine.org> X-Mailer: git-send-email 2.11.1 In-Reply-To: <20170222152510.5039-1-robert@sixbynine.org> References: <20170222152510.5039-1-robert@sixbynine.org> Subject: [Intel-gfx] [PATCH 3/3] drm/i915/perf: rate limit spurious oa report notice X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP This change is pre-emptively aiming to avoid a potential cause of kernel logging noise in case some condition were to result in us seeing invalid OA reports. The workaround for the OA unit's tail pointer race condition is what avoids the primary know cause of invalid reports being seen and with that in place we aren't expecting to see this notice but it can't be entirely ruled out. Just in case some condition does lead to the notice then it's likely that it will be triggered repeatedly while attempting to append a sequence of reports and depending on the configured OA sampling frequency that might be a large number of repeat notices. Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/i915_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index d04ebaa8406e..a901bcd80263 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -632,7 +632,8 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream, * copying it to userspace... */ if (report32[0] == 0) { - DRM_NOTE("Skipping spurious, invalid OA report\n"); + if (printk_ratelimit()) + DRM_NOTE("Skipping spurious, invalid OA report\n"); continue; }