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 E88E1C54EE9 for ; Tue, 20 Sep 2022 03:22:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFED310E25B; Tue, 20 Sep 2022 03:22:44 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5D4910E25B for ; Tue, 20 Sep 2022 03:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663644161; x=1695180161; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=L/ZmNJR9TZVVtmGnH/aGcGmD6v8WPR/5TFeX/7oJaPM=; b=MsL8ixdTRgy44ae39jVsmK0BLOhPcPTmUe0gqejezBlBcB/kuO/sSTAc 3WW6ZMfsDgBQnFsKvpBCs24NYc6drPOT+jItIzDq1WkisFQRbXmcY1AM+ hRw4ZpxwjqHt+31HFGThJtD81zSxmSoHGfoUPvIbxm4DrYhMF8Kyf7qNk 7rlqUoilR23p8W6Nl6/N+ZZ4Hk1HjACQGgAzkwDSY/zRsuefxqytuxsra X/G3ami9jjH8Ks90wp8wmWiFwz3g40bNBu0Qeq8Gq/hEQgRqhbQEGOdr7 92uNmNS+DA744aAjGC5pULL4ZnBblB95/z4wnIKqtg/NCSESqXk6due2p A==; X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="300403070" X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="300403070" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 20:22:41 -0700 X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="794100390" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.251.10.194]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2022 20:22:41 -0700 Date: Mon, 19 Sep 2022 20:22:40 -0700 Message-ID: <87wn9yd91b.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: References: <20220823204155.8178-1-umesh.nerlige.ramappa@intel.com> <20220823204155.8178-2-umesh.nerlige.ramappa@intel.com> <9afc705a-87a1-c51e-b223-e32accbcd2fe@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 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. Thanks. -- Ashutosh > >>> -Lionel > >>> > >>> > >>>> > >>>>> > >>>>> If that's not the case then filtering is broken. > >>>>> > >>>>> > >>>>> -Lionel > >>>>> > >>>>>