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 A521FC54EE9 for ; Thu, 22 Sep 2022 03:51:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0B08910E569; Thu, 22 Sep 2022 03:51:37 +0000 (UTC) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 817ED10E42C for ; Thu, 22 Sep 2022 03:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663818692; x=1695354692; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=+7Syj8/q7QWQafPfa2uowTs6hhjQAlgUehmT0qLRNtI=; b=J+HKBeaJ0YjgpUcbaaS8pHFhSRHWkiFQYEwny+g9H4I/Q7yYbDg8/vfv Gp3h6+5U1JQ9LJmqGw0W8eEIHVgfBPUdJWtZVjiy1D116blBLzEQtA3bj n1gzHpJp8XQQt83XQq8PJhbmLyQmgrm3AR5zYZh8cPujZRLu1EBMJxFj5 Gr6X5BeKbaUBD69l1Nit84rDXE/4MOm4w7FzjNLb08epkrOixtyiPS8GK RJvLBpJ5Bb/AR3v2RrU4L8/k2TXMHClz7VLPO6X75LEbto30+yXsJwR5L Zb6LdUwarzpBLABkd4CFUlyJXbOkN+Z0LRaBzK6wbRNETgkdGcYHsY248 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="297790142" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="297790142" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 20:51:31 -0700 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="762023092" Received: from jrluquin-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.181.182]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 20:51:31 -0700 Date: Wed, 21 Sep 2022 20:51:31 -0700 Message-ID: <87bkr8m5h8.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <87wn9yd91b.wl-ashutosh.dixit@intel.com> References: <20220823204155.8178-1-umesh.nerlige.ramappa@intel.com> <20220823204155.8178-2-umesh.nerlige.ramappa@intel.com> <9afc705a-87a1-c51e-b223-e32accbcd2fe@intel.com> <87wn9yd91b.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/28.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-gfx] [PATCH 01/19] drm/i915/perf: Fix OA filtering logic for GuC mode 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 19 Sep 2022 20:22:40 -0700, Dixit, Ashutosh wrote: > > On Thu, 15 Sep 2022 15:49:27 -0700, Umesh Nerlige Ramappa wrote: > > > > On Wed, Sep 14, 2022 at 04:13:41PM -0700, Umesh Nerlige Ramappa wrote: > > > On Wed, Sep 14, 2022 at 03:26:15PM -0700, Umesh Nerlige Ramappa wrote: > > >> On Tue, Sep 06, 2022 at 09:39:33PM +0300, Lionel Landwerlin wrote: > > >>> On 06/09/2022 20:39, Umesh Nerlige Ramappa wrote: > > >>>> On Tue, Sep 06, 2022 at 05:33:00PM +0300, Lionel Landwerlin wrote: > > >>>>> On 23/08/2022 23:41, Umesh Nerlige Ramappa wrote: > > >>>>>> With GuC mode of submission, GuC is in control of defining the > > >>>>>> context id field > > >>>>>> that is part of the OA reports. To filter reports, UMD and KMD must > > >>>>>> know what sw > > >>>>>> context id was chosen by GuC. There is not interface between KMD and > > >>>>>> GuC to > > >>>>>> determine this, so read the upper-dword of EXECLIST_STATUS to > > >>>>>> filter/squash OA > > >>>>>> reports for the specific context. > > >>>>>> > > >>>>>> Signed-off-by: Umesh Nerlige Ramappa > > >>>>> > > >>>>> > > >>>>> I assume you checked with GuC that this doesn't change as the context > > >>>>> is running? > > >>>> > > >>>> Correct. > > >>>> > > >>>>> > > >>>>> With i915/execlist submission mode, we had to ask i915 to pin the > > >>>>> sw_id/ctx_id. > > >>>>> > > >>>> > > >>>> From GuC perspective, the context id can change once KMD de-registers > > >>>> the context and that will not happen while the context is in use. > > >>>> > > >>>> Thanks, > > >>>> Umesh > > >>> > > >>> > > >>> Thanks Umesh, > > >>> > > >>> > > >>> Maybe I should have been more precise in my question : > > >>> > > >>> > > >>> Can the ID change while the i915-perf stream is opened? > > >>> > > >>> Because the ID not changing while the context is running makes sense. > > >>> > > >>> But since the number of available IDs is limited to 2k or something on > > >>> Gfx12, it's possible the GuC has to reuse IDs if too many apps want to > > >>> run during the period of time while i915-perf is active and filtering. > > >>> > > >> > > >> available guc ids are 64k with 4k reserved for multi-lrc, so GuC may > > >> have to reuse ids once 60k ids are used up. > > > > > > Spoke to the GuC team again and if there are a lot of contexts (> 60K) > > > running, there is a possibility of the context id being recycled. In that > > > case, the capture would be broken. I would track this as a separate JIRA > > > and follow up on a solution. > > > > > > From OA use case perspective, are we interested in monitoring just one > > > hardware context? If we make sure this context is not stolen, are we > > > good? > > > > > > > + John > > > > Based on John's inputs - if a context is pinned, then KMD does not steal > > it's id. It would just look for something else or wait for a context to be > > available (pin count 0 I believe). > > > > Since we pin the context for the duration of the OA use case, we should be > > good here. > > Since this appears to be true I am thinking of okay'ing this patch rather > than define a new interface with GuC for this. Let me know if there are any > objections about this. With the above comments/assumptions this is: Reviewed-by: Ashutosh Dixit