Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, netdev <netdev@vger.kernel.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Chris Wilson <chris.p.wilson@intel.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: [Intel-gfx] [PATCH v3 00/11] drm/i915: use ref_tracker library for tracking wakerefs
Date: Tue, 22 Feb 2022 00:25:31 +0100	[thread overview]
Message-ID: <20220221232542.1481315-1-andrzej.hajda@intel.com> (raw)

Hi,

Appearance of ref_tracker library allows to drop custom solution for wakeref
tracking used in i915 and reuse the library.
For this few adjustements has been made to ref_tracker, details in patches.
I hope changes are OK for original author.

The patchset has been rebased on top of drm-tip to allow test changes by CI.
Patches marked "[DO NOT MERGE]" are cherry-picked from linux-next (they are
not yet in drm-tip), to allow build and run CI on the patchset (it works only
on drm-tip tree).

Added CC to netdev as the only user of the library atm.

v2:
  - replaced list_sort with ref_tracker_dir_stats, to avoid potentially
    extensive sorting, if number of reports is expected to be big enough (???)
    we can replace linear search in ref_tracker_dir_stats.stacks with binary
    heap (min_heap),
  - refactored gfp flags,
  - fixed i915 handling of no-tracking flag.
v3:
  - fixed mess with duplicated mails

Regards
Andrzej


Andrzej Hajda (6):
  lib/ref_tracker: add unlocked leak print helper
  lib/ref_tracker: __ref_tracker_dir_print improve printing
  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 Intel internal tracker with kernel core ref_tracker

Chris Wilson (2):
  drm/i915: Separate wakeref tracking
  drm/i915: Track leaked gt->wakerefs

Eric Dumazet (3):
  [DO NOT MERGE] ref_tracker: implement use-after-free detection
  [DO NOT MERGE] ref_tracker: add a count of untracked references
  [DO NOT MERGE] ref_tracker: remove filter_irq_stacks() call

 drivers/gpu/drm/i915/Kconfig.debug            |  19 ++
 drivers/gpu/drm/i915/Makefile                 |   1 +
 .../drm/i915/display/intel_display_power.c    |   2 +-
 .../gpu/drm/i915/gem/i915_gem_execbuffer.c    |   7 +-
 .../i915/gem/selftests/i915_gem_coherency.c   |  10 +-
 .../drm/i915/gem/selftests/i915_gem_mman.c    |  14 +-
 drivers/gpu/drm/i915/gt/intel_breadcrumbs.c   |  13 +-
 .../gpu/drm/i915/gt/intel_breadcrumbs_types.h |   3 +-
 drivers/gpu/drm/i915/gt/intel_engine_pm.c     |   6 +-
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |   2 +
 .../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         |  36 ++-
 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       |  10 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  11 +-
 drivers/gpu/drm/i915/i915_pmu.c               |  16 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       | 239 ++----------------
 drivers/gpu/drm/i915/intel_runtime_pm.h       |  10 +-
 drivers/gpu/drm/i915/intel_wakeref.c          |  10 +-
 drivers/gpu/drm/i915/intel_wakeref.h          | 112 +++++++-
 include/linux/ref_tracker.h                   |  35 ++-
 lib/ref_tracker.c                             | 198 ++++++++++++---
 27 files changed, 480 insertions(+), 344 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-02-21 23:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 23:25 Andrzej Hajda [this message]
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 01/11] [DO NOT MERGE] ref_tracker: implement use-after-free detection Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 02/11] [DO NOT MERGE] ref_tracker: add a count of untracked references Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 03/11] [DO NOT MERGE] ref_tracker: remove filter_irq_stacks() call Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 04/11] lib/ref_tracker: add unlocked leak print helper Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 05/11] lib/ref_tracker: __ref_tracker_dir_print improve printing Andrzej Hajda
2022-02-22  0:08   ` Eric Dumazet
2022-02-22 10:27     ` Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 06/11] lib/ref_tracker: add printing to memory buffer Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 07/11] lib/ref_tracker: remove warnings in case of allocation failure Andrzej Hajda
2022-02-21 23:54   ` Eric Dumazet
2022-02-22 10:44     ` Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 08/11] drm/i915: Separate wakeref tracking Andrzej Hajda
2022-02-22  7:12   ` Ville Syrjälä
2022-02-22  9:28     ` Andrzej Hajda
2022-02-22  9:44       ` Ville Syrjälä
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 09/11] drm/i915: Track leaked gt->wakerefs Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 10/11] drm/i915: Correct type of wakeref variable Andrzej Hajda
2022-02-21 23:25 ` [Intel-gfx] [PATCH v3 11/11] drm/i915: replace Intel internal tracker with kernel core ref_tracker Andrzej Hajda
2023-01-06 14:15   ` Das, Nirmoy
2022-02-21 23:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: use ref_tracker library for tracking wakerefs (rev3) Patchwork
2022-02-21 23:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-22  0:02 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220221232542.1481315-1-andrzej.hajda@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=chris.p.wilson@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox