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 X-Spam-Level: X-Spam-Status: No, score=-1.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, HK_RANDOM_FROM,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB07DC2BA83 for ; Fri, 14 Feb 2020 13:41:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 978112168B for ; Fri, 14 Feb 2020 13:41:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 978112168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B8976E7F1; Fri, 14 Feb 2020 13:41:38 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2014F6E7F1 for ; Fri, 14 Feb 2020 13:41:37 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2020 05:41:36 -0800 X-IronPort-AV: E=Sophos;i="5.70,440,1574150400"; d="scan'208";a="223019356" Received: from ayashfe-mobl1.ger.corp.intel.com (HELO [10.251.86.31]) ([10.251.86.31]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/AES256-SHA; 14 Feb 2020 05:41:35 -0800 To: Chris Wilson , Andi Shyti , Intel GFX References: <20200214110308.2268-1-andi.shyti@intel.com> <158168632802.10420.7548890837084892851@skylake-alporthouse-com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: Date: Fri, 14 Feb 2020 13:41:33 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <158168632802.10420.7548890837084892851@skylake-alporthouse-com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: make a gt sysfs group and move power management files 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 14/02/2020 13:18, Chris Wilson wrote: > Quoting Tvrtko Ursulin (2020-02-14 12:54:35) >> >> On 14/02/2020 11:03, Andi Shyti wrote: >>> +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev) >>> +{ >>> + struct kobject *kobj = &dev->kobj; >>> + /* >>> + * We are interested at knowing from where the interface >>> + * has been called, whether it's called from gt/ or from >>> + * the parent directory. >>> + * From the interface position it depends also the value of >>> + * the private data. >>> + * If the interface is called from gt/ then private data is >>> + * of the "struct intel_gt *" type, otherwise it's * a >>> + * "struct drm_i915_private *" type. >>> + */ >>> + if (strcmp(dev->kobj.name, "gt")) { >>> + struct drm_i915_private *i915 = kdev_minor_to_i915(dev); >>> + >>> + drm_warn(&i915->drm, "the interface is obsolete, use gt/\n"); >> >> Can you log current->name & pid? >> >> I am also thinking is a level down from warn would be better. Notice >> sounds intuitively correct to me. > > git grep -e 'pr.*obsolete' | grep warn | wc -l > 21 > git grep -e 'pr.*obsolete' | grep notice | wc -l > 1 > git grep -e 'pr.*obsolete' | grep info | wc -l > 4 > > Looks like warn's back on the menu, boys. Majority is just wrong. :P >> I am also tempted by the _once alternative, but then it makes less sense >> to include name & pid. > > I'm more afraid that there are users out there that frequently poke > these files. Agreed, I think best option is to go with ratelimited and name & pid logged. And more verbosity about what has been access and what should be accessed instead. Regards, Tvrtko _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx