Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1381618rwr; Fri, 5 May 2023 13:15:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KZTq57ZVBzk8V2oCiyMkORgcB7TWItA7pBI50vgQ4rdGLjopjiA78LvNmsut8puGF96/e X-Received: by 2002:a17:902:f543:b0:19c:da7f:a234 with SMTP id h3-20020a170902f54300b0019cda7fa234mr2559426plf.67.1683317713791; Fri, 05 May 2023 13:15:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683317713; cv=none; d=google.com; s=arc-20160816; b=OZsCEaRFzN41s+es7GuRr6RU/HQ/38Gky2cwOF6YPmoSowssIG06UV5jDH2CkG/5Nq rWZddhi4IB0J29EaH0VR7qS2s1E/FmXTn8m8uMrM/93F6K/UFVaWtPCfRCa98/Xx5lzm yNeGHNRKNpr964pDFDn5bIqFp5fezVxrBsSb3Q0kjT1aMHqy+bDL2ExT5xti9cJjSyja gPkGJAtmoPhRqR+G/thFKEm6yVqIEZPtmVzs9xzNMxIvq2DNc2t2qm7FO9ONG5xrxHYf Dx5kc3Lh8p4UmTzlhVsgb9YOwB+r7veRuZ+w6Xe7ZI89MV1Dv4wVby/HedvZW8DYTlSP /6Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lFsedTjlGRpas1jNawYwxDb01WtgV+nFcr0FkM+iwHg=; b=mDITItbCOGsihb0ZTwISZKq5aYDZawrTZseoIlCBmY1AQisvvo6YpWEa8C0XfDOWBB onRefiHe2eJ2eaf+E1MJgtaOZk6kNk9n02Ohkp+tgR+czI4U9oA7ccZLRVfQfrjZ9yTr UF3LQuxFfxozeahpZ4gP+CZyr59Nh2ZdJ4mhrOMmFdeO2ci+vy1mCvmayoZ/1nHzDFqx BVic8t7vZumThagWAoK7DonmdQbJy+zsQONEYFQ6fwSp1R4P+CfmMa/o8XdORg1GShiz b9Dro8BtVWXt3GVMsmKZzdAkqo1YlqAqJxWAcHHXDJU34XlCjqZqKo2SgNs6JMtqQDFo sFFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f29-20020a63381d000000b005250385bfdbsi2867841pga.549.2023.05.05.13.14.58; Fri, 05 May 2023 13:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230421AbjEEUGl (ORCPT + 99 others); Fri, 5 May 2023 16:06:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbjEEUGk (ORCPT ); Fri, 5 May 2023 16:06:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800D6D3 for ; Fri, 5 May 2023 13:06:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1549C6406E for ; Fri, 5 May 2023 20:06:38 +0000 (UTC) Received: from rdvivi-mobl4 (unknown [192.55.54.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPSA id A06DCC433D2; Fri, 5 May 2023 20:06:33 +0000 (UTC) Date: Fri, 5 May 2023 16:06:31 -0400 From: Rodrigo Vivi To: Andrzej Hajda Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Eric Dumazet , "David S . Miller" , netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chris Wilson , Jakub Kicinski , Dmitry Vyukov Subject: Re: [Intel-gfx] [PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs Message-ID: References: <20230224-track_gt-v8-0-4b6517e61be6@intel.com> <55aa19b3-58d4-02ae-efd1-c3f3d0f21ce6@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55aa19b3-58d4-02ae-efd1-c3f3d0f21ce6@intel.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 04, 2023 at 06:27:53PM +0200, Andrzej Hajda wrote: > Hi maintainers of net and i915, > > On 25.04.2023 00:05, Andrzej Hajda wrote: > > This is revived patchset improving ref_tracker library and converting > > i915 internal tracker to ref_tracker. > > The old thread ended without consensus about small kernel allocations, > > which are performed under spinlock. > > I have tried to solve the problem by splitting the calls, but it results > > in complicated API, so I went back to original solution. > > If there are better solutions I am glad to discuss them. > > Meanwhile I send original patchset with addressed remaining comments. > > > > To: Jani Nikula > > To: Joonas Lahtinen > > To: Rodrigo Vivi > > To: Tvrtko Ursulin > > To: David Airlie > > To: Daniel Vetter > > To: Eric Dumazet > > Cc: linux-kernel@vger.kernel.org > > Cc: intel-gfx@lists.freedesktop.org > > Cc: dri-devel@lists.freedesktop.org > > Cc: Chris Wilson > > Cc: netdev@vger.kernel.org > > Cc: Jakub Kicinski > > Cc: Dmitry Vyukov > > Cc: "David S. Miller" > > Cc: Andi Shyti > > Cc: Das, Nirmoy > > Signed-off-by: Andrzej Hajda > > > > --- > > Changes in v8: > > - addressed comments from Eric, Zhou and CI, thanks, > > - added ref_tracker_dir_init name argument to all callers in one patch > > - moved intel_wakeref_tracker_show to *.c > > - s/intel_wakeref_tracker_show/intel_ref_tracker_show/ > > - removed 'default n' from Kconfig > > - changed strlcpy to strscpy, > > - removed assignement from if condition, > > - removed long lines from patch description > > - added tags > > - Link to v7: https://lore.kernel.org/r/20230224-track_gt-v7-0-11f08358c1ec@intel.com > > > > Changes in v7: > > - removed 8th patch (hold wakeref), as it was already merged > > - added tags (thx Andi) > > - Link to v6: https://lore.kernel.org/r/20230224-track_gt-v6-0-0dc8601fd02f@intel.com > > > > Changes in v6: > > - rebased to solve minor conflict and allow CI testing > > - Link to v5: https://lore.kernel.org/r/20230224-track_gt-v5-0-77be86f2c872@intel.com > > > > Changes in v5 (thx Andi for review): > > - use *_locked convention instead of __*, > > - improved commit messages, > > - re-worked i915 patches, squashed separation and conversion patches, > > - added tags, > > - Link to v4: https://lore.kernel.org/r/20230224-track_gt-v4-0-464e8ab4c9ab@intel.com > > > > Changes in v4: > > - split "Separate wakeref tracking" to smaller parts > > - fixed typos, > > - Link to v1-v3: https://patchwork.freedesktop.org/series/100327/ > > > > --- > > Andrzej Hajda (7): > > lib/ref_tracker: add unlocked leak print helper > > lib/ref_tracker: improve printing stats > > lib/ref_tracker: add printing to memory buffer > > lib/ref_tracker: remove warnings in case of allocation failure > > drm/i915: Correct type of wakeref variable > > drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library > > drm/i915: Track gt pm wakerefs > > Finally all patches are reviewed. > Question to network and i915 maintainers, how to merge this patchset: > 1. Patches 1-4 belongs rather to network domain (especially patch 2). > 2. Patches 5-7 are for i915. Well, probably the easiest way to avoid conflicts would be to send this right now through the net repo. And hold patches 5-7 after drm-intel-next can backmerge them. At this point I believe we would be looking at 6.5-rc2 backmerge to drm-intel-next in likely 11 weeks from now. Do we have any urgency on them? Looking to all the changes in i915 I believe we will get many conflicts if we let all these i915 patches go through net tree as well. > > What would be the best way to do it? > > Regards > Andrzej > > > > > > > drivers/gpu/drm/i915/Kconfig.debug | 18 ++ > > drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- > > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +- > > .../drm/i915/gem/selftests/i915_gem_coherency.c | 10 +- > > drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 14 +- > > drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 13 +- > > drivers/gpu/drm/i915/gt/intel_breadcrumbs_types.h | 3 +- > > drivers/gpu/drm/i915/gt/intel_context.h | 4 +- > > drivers/gpu/drm/i915/gt/intel_context_types.h | 2 + > > drivers/gpu/drm/i915/gt/intel_engine_pm.c | 7 +- > > drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 + > > .../gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- > > drivers/gpu/drm/i915/gt/intel_gt_pm.c | 12 +- > > drivers/gpu/drm/i915/gt/intel_gt_pm.h | 38 +++- > > drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 +- > > drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 20 +- > > drivers/gpu/drm/i915/gt/selftest_gt_pm.c | 5 +- > > drivers/gpu/drm/i915/gt/selftest_reset.c | 10 +- > > drivers/gpu/drm/i915/gt/selftest_rps.c | 17 +- > > drivers/gpu/drm/i915/gt/selftest_slpc.c | 5 +- > > drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 12 +- > > drivers/gpu/drm/i915/i915_driver.c | 2 +- > > drivers/gpu/drm/i915/i915_pmu.c | 16 +- > > drivers/gpu/drm/i915/intel_runtime_pm.c | 221 ++------------------- > > drivers/gpu/drm/i915/intel_runtime_pm.h | 11 +- > > drivers/gpu/drm/i915/intel_wakeref.c | 35 +++- > > drivers/gpu/drm/i915/intel_wakeref.h | 73 ++++++- > > include/linux/ref_tracker.h | 25 ++- > > lib/ref_tracker.c | 179 ++++++++++++++--- > > lib/test_ref_tracker.c | 2 +- > > net/core/dev.c | 2 +- > > net/core/net_namespace.c | 4 +- > > 32 files changed, 445 insertions(+), 332 deletions(-) > > --- > > base-commit: 4d0066a1c0763d50b6fb017e27d12b081ce21b57 > > change-id: 20230224-track_gt-1b3da8bdacd7 > > > > Best regards, >