From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB9B0C2BB1D for ; Fri, 17 Apr 2020 23:25:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9827E221EA for ; Fri, 17 Apr 2020 23:25:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9827E221EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 306776EBA2; Fri, 17 Apr 2020 23:25:57 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0EC4A6EBA2 for ; Fri, 17 Apr 2020 23:25:54 +0000 (UTC) IronPort-SDR: o1z1ViLwZeyvF1gjckO01kok69pNk+bM3EPMLzpbJqe5fxPS223wm8s5woLs8dZyGslbJEzIjL mrwDRI+P7WLA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 16:25:54 -0700 IronPort-SDR: mCON5pea/bpGBV9K6lGy599lS7CO+ZN8GriZBEAGx7zMb2w6Uvxkj4zZNLO4bUrP2yJhbG8o2S CQyKoaz0qc2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,395,1580803200"; d="scan'208";a="454884691" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.134.116.125]) by fmsmga005.fm.intel.com with ESMTP; 17 Apr 2020 16:25:53 -0700 Date: Fri, 17 Apr 2020 16:25:53 -0700 Message-ID: <87lfmtu22m.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20200413154822.11620-3-umesh.nerlige.ramappa@intel.com> References: <20200413154822.11620-1-umesh.nerlige.ramappa@intel.com> <20200413154822.11620-3-umesh.nerlige.ramappa@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915: handle interrupts from the OA unit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 13 Apr 2020 08:48:21 -0700, Umesh Nerlige Ramappa wrote: > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_irq.c b/drivers/gpu/drm/i915/gt/intel_gt_irq.c > index 0cc7dd54f4f9..61eee9fb8872 100644 > --- a/drivers/gpu/drm/i915/gt/intel_gt_irq.c > +++ b/drivers/gpu/drm/i915/gt/intel_gt_irq.c > @@ -94,6 +94,18 @@ gen11_gt_engine_identity(struct intel_gt *gt, > return ident; > } > > +static void notify_perfmon_buffer_half_full(struct drm_i915_private *i915) > +{ > + atomic64_inc(&i915->perf.exclusive_stream->half_full_count); > + wake_up_all(&i915->perf.exclusive_stream->poll_wq); > +} > + I was expecting this function to be almost the same as the timer oa_poll_check_timer_cb(), something like, maybe with minor variations: static void notify_perfmon_buffer_half_full(struct drm_i915_private *i915) { struct i915_perf_stream *stream = i915->perf.exclusive_stream; if (oa_buffer_check_unlocked(stream)) { stream->pollin = true; wake_up(&stream->poll_wq); } } And consequently I was expecting to see zero changes to functions such as oa_buffer_check_unlocked() and i915_perf_poll_locked() since everything else is driven off stream->pollin as it is in case the timer callback. So my question is why is notify_perfmon_buffer_half_full() not as I've written above and what purpose are these new members half_full_count and half_full_count_last serving? If it is to save a few cycles to adjust the tail in oa_buffer_check_unlocked() (and I am not even sure of that) for an interrupt which fires when half the buffer is full imo it is not worth it. _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx