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 4036AC352A1 for ; Wed, 7 Dec 2022 06:05:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C355D10E0E2; Wed, 7 Dec 2022 06:05:20 +0000 (UTC) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3FE010E0E2 for ; Wed, 7 Dec 2022 06:05:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670393115; x=1701929115; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=bQhpuqhmabPcT4E52KcOO4g8ayMgUP75Eda1fxR5bbM=; b=eLX4KY4RHTECQBP3whi61PX+CqWDodhMMjLgIWmXTkYz16VWLrBW0S21 AvynoO+qphX5To9uNGVky4VLTPFan8TN1zTBtXVEP48DGzvSaKtAveP6b QFEqxZPBuPFwsc4Ju+hqkRZ2fa3j3dc8iM8l6yzVSGSXO04T+iCIBXkJo Wc7ig/9thSHYeqY4+g0P1Lx7ZXd1KFxBmz1Rw9KPYI4nKrjnWw3uTEG+B nsIvHDlJa5JvdqCkCoOWZruLmaw5ouL6qOuvVgH6Xd4cfGdf0Jea4P7HW RIVSmVrI7+VLJYtPAcKcRBKOiQbqEfv9FOEC4Qohbrg/6Jb9Yw5Zos9iJ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="378979926" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="378979926" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 22:05:14 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="752951827" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="752951827" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.85.73]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 22:05:13 -0800 Date: Tue, 06 Dec 2022 22:00:55 -0800 Message-ID: <87zgbzda7c.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Teres Alexis, Alan Previn" In-Reply-To: References: <20220509210151.1843173-1-alan.previn.teres.alexis@intel.com> <20220509210151.1843173-5-alan.previn.teres.alexis@intel.com> <87lesobges.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.2 (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] [Intel-gfx 4/6] drm/i915/guc: Provide debugfs for log relay sub-buf info 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, 05 Dec 2022 17:55:20 -0800, Teres Alexis, Alan Previn wrote: > Hi Alan, > It's been a while - trying to resurrect this now. > > On Tue, 2022-07-19 at 20:40 -0700, Dixit, Ashutosh wrote: > > On Mon, 09 May 2022 14:01:49 -0700, Alan Previn wrote: > > > > > > > Alan: [snip] > > > > +#define GUC_LOG_RELAY_SUBBUF_COUNT 8 > > > +u32 intel_guc_log_relay_subbuf_count(struct intel_guc_log *log) > > > +{ > > > + return GUC_LOG_RELAY_SUBBUF_COUNT; > > > +} > > > > uapi wise, instead of exposing guc_log_size and subbuf_count, why not > > expose subbuf_size and subbuf_count? > > To combine addressing your request + consistency with existing knobs (all > of which are dedicated for guc-relay-logging), I'll go ahead and change > it to guc_log_relay_subbuf_size_get and guc_log_relay_subbuf_count_get. OK, great! > > > > > +static int guc_log_relay_buf_size_get(void *data, u64 *val) > > > +{ > > > + struct intel_guc_log *log = data; > > > + > > > + if (!log) > > > + return -ENODEV; > > > + if (!log->vma) > > > + return -ENODEV; > > > > Why are these checks needed? Hasn't log been initialized and attached at > > intel_gt_debugfs_register_files()/debugfs_create_file() time itself? > > > > Also if needed let's do: > > > > if (!log || !log->vma) > > return -ENODEV; > > > Alan: You are right, we don't to check log but might need to check > log->vma: its been a long time - i can vaguely remember but i recall some > weird behavior if the user space was holding on to relay logging handles > and still calling in while driver is being unloaded. I'll have to retest > this and see if its something to care about or consider as a user > error. But even there, we can shorten it to if(!log->vma) as the > minimum. (of course even if there was a bug, the debugfs path should > eventually get released as part of the i915 unload but just a tiny bit > later after the guc resources are freed). Same comment here applies to > two more comments you provided. Needs to be tested. So did you test this before sending out the latest series? Or does this still have to be done? I am holding off on this patch till I hear about this. Thanks. -- Ashutosh > > > > Alan: [snip]