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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 17D4BC4332F for ; Mon, 13 Nov 2023 20:22:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3B0610E009; Mon, 13 Nov 2023 20:22:36 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4A3210E009 for ; Mon, 13 Nov 2023 20:22:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699906954; x=1731442954; h=date:message-id:from:to:subject:in-reply-to:references: mime-version; bh=+evO3l52NZ0bz8YmAaplAvaMew1nXVr8Z67zLL3+S6s=; b=eaOoiuuPWsu8cDsBo186AyxgQMdEn8LDShsRYcaeAUQpIQXziSXZ/L8u i0BzcSiVCve1Z+83zFJoJtIen0BOf0YCErOVGr4ruBH+7lu8AoTHxOCiV jiCE5I+/zyBeZpeTOR4phTEJKH0G7R8skDEeAPBP76yXv6T/9BCNM4o0o 6XKkbvSgZQISvrBRRU23/k8jWg8hP9tJzflCSWZbP4VXjDzVJ2ZJd5ZBN cvjWcCMVlcxbM1C1zQ7vhy/WvZ3ZcGU3uwJlyWzmH71gKQ86Kdieiarj3 6TwJvzhr3lEj+L4KcMnT/Gxdlgs6te1BxtdHRbOfQ+EzcRVlF/vxp8QQV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10893"; a="387672702" X-IronPort-AV: E=Sophos;i="6.03,299,1694761200"; d="scan'208";a="387672702" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2023 12:22:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10893"; a="937830906" X-IronPort-AV: E=Sophos;i="6.03,299,1694761200"; d="scan'208";a="937830906" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.201.134]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2023 12:22:33 -0800 Date: Mon, 13 Nov 2023 12:22:32 -0800 Message-ID: <87wmulflo7.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: intel-xe@lists.freedesktop.org In-Reply-To: <87pm2sqgtm.wl-ashutosh.dixit@intel.com> References: <20230908042348.1592535-1-ashutosh.dixit@intel.com> <20230908042348.1592535-18-ashutosh.dixit@intel.com> <87pm2sqgtm.wl-ashutosh.dixit@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [Intel-xe] [PATCH 17/17] drm/xe/oa: Remove filtering reports on context id X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Fri, 08 Sep 2023 18:24:37 -0700, Dixit, Ashutosh wrote: > > On Thu, 07 Sep 2023 21:23:48 -0700, Ashutosh Dixit wrote: > > > > Hi Umesh, > > > At present XE OA code does not obtain context id's from GuC. Even if these > > context id's were available it is not clear if included reports for > > userspace should be filtered on context id's. Till these issues are > > resolved remove filtering reports based on context id's. > > Need more clarity on what we are doing here and why. > > > @@ -419,21 +409,10 @@ static int xe_oa_append_reports(struct xe_oa_stream *stream, char __user *buf, > > * since it's not-uncommon for periodic samples to identify a switch > > * before any 'context switch' report. > > */ > > - if (!stream->exec_q || stream->specific_ctx_id == ctx_id || > > - stream->oa_buffer.last_ctx_id == stream->specific_ctx_id || > > - reason & OAREPORT_REASON_CTX_SWITCH) { > > - /* > > - * While filtering for a single context we avoid > > - * leaking the IDs of other contexts. > > - */ > > - if (stream->exec_q && stream->specific_ctx_id != ctx_id) > > - oa_context_id_squash(stream, report32); > > - > > + if (!stream->exec_q || reason & OAREPORT_REASON_CTX_SWITCH) { > > Also, could you take a look at this? I wasn't sure, should we do this, or > should we call xe_oa_append_sample() below unconditionally if we are > removing context filtering. I have dropped the above if () statement, it's obviously incorrect. > > > ret = xe_oa_append_sample(stream, buf, count, offset, report); > > if (ret) > > break; > > - > > - stream->oa_buffer.last_ctx_id = ctx_id; > > } > > Thanks. > -- > Ashutosh