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 B4206EEB565 for ; Sat, 9 Sep 2023 01:24:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8917010E0DB; Sat, 9 Sep 2023 01:24:40 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 749BB10E0DB for ; Sat, 9 Sep 2023 01:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694222679; x=1725758679; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=hALASMf4+ZV4f2UN8RTUx6zZN7lRSwof/BvIgodvTG8=; b=ejb56mp+XvbbDFGq2TNxXf39WX7s5HRxEnVpK0TQtcSPexMb+AjCx9e/ 8kVcVqYa3IOxmajiVuQTU5htkgrhX8XzW96nR1JuoPbrH0DCRuOvMtb8t fPFp4fNhzJO4Qi7cDqmpMtcU0tSMs7rZgVehGcEFtCuH6++uQuTWjXDii MRPFHsEigxbnjNALZXxu5/tTTH/dtudntQZUmHCOoMe1oaSKzTpZIJ5Kj vFcudwrUgRV+7Hg1iy/qgw440MV3ffhb0LWYVfA9V30id0/SNT8QenLMr WVMar8hxO1zok2elN9XOFM9O5j44yvekXZrX3TMClPkV0H41pTxddkA/A A==; X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="376690613" X-IronPort-AV: E=Sophos;i="6.02,238,1688454000"; d="scan'208";a="376690613" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2023 18:24:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="745793480" X-IronPort-AV: E=Sophos;i="6.02,238,1688454000"; d="scan'208";a="745793480" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.81.191]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2023 18:24:38 -0700 Date: Fri, 08 Sep 2023 18:24:37 -0700 Message-ID: <87pm2sqgtm.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: intel-xe@lists.freedesktop.org In-Reply-To: <20230908042348.1592535-18-ashutosh.dixit@intel.com> References: <20230908042348.1592535-1-ashutosh.dixit@intel.com> <20230908042348.1592535-18-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 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. > ret = xe_oa_append_sample(stream, buf, count, offset, report); > if (ret) > break; > - > - stream->oa_buffer.last_ctx_id = ctx_id; > } Thanks. -- Ashutosh