All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 0/3] drm/i915/uncore: unclaimed reg debug race fix and optimization
Date: Tue,  4 Jul 2023 12:48:46 +0300	[thread overview]
Message-ID: <cover.1688463863.git.jani.nikula@intel.com> (raw)

Fix a race in unclaimed reg debug. This does increase the code size for
CONFIG_DRM_I915_DEBUG_MMIO=y.

However, also add an optimization to reduce code size for
CONFIG_DRM_I915_DEBUG_MMIO=n.

Do we care about the bloat for the debug config?

Before/after for both CONFIG_DRM_I915_DEBUG_MMIO=y and =n.


$ scripts/bloat-o-meter intel_uncore.before.with-debug.o intel_uncore.after.with-debug.o
add/remove: 0/2 grow/shrink: 10/0 up/down: 927/-149 (778)
Function                                     old     new   delta
fwtable_read16                               721     821    +100
fwtable_read32                               719     817     +98
fwtable_read8                                722     818     +96
fwtable_read64                               722     817     +95
gen6_write16                                 679     772     +93
gen6_write8                                  678     769     +91
gen6_write32                                 677     768     +91
fwtable_write16                              742     831     +89
fwtable_write8                               741     828     +87
fwtable_write32                              740     827     +87
__pfx___unclaimed_reg_debug                   16       -     -16
__unclaimed_reg_debug                        133       -    -133
Total: Before=33797, After=34575, chg +2.30%

$ scripts/bloat-o-meter intel_uncore.before.without-debug.o intel_uncore.after.without-debug.o
add/remove: 0/2 grow/shrink: 0/10 up/down: 0/-2557 (-2557)
Function                                     old     new   delta
__pfx___unclaimed_reg_debug                   16       -     -16
__unclaimed_reg_debug                        133       -    -133
gen6_write8                                  678     446    -232
gen6_write32                                 677     445    -232
gen6_write16                                 679     447    -232
fwtable_read64                               722     482    -240
fwtable_read32                               719     479    -240
fwtable_read16                               721     481    -240
fwtable_read8                                722     480    -242
fwtable_write8                               741     491    -250
fwtable_write32                              740     490    -250
fwtable_write16                              742     492    -250
Total: Before=33797, After=31240, chg -7.57%

Cc: Lee Shawn C <shawn.c.lee@intel.com>

Jani Nikula (3):
  drm/i915/uncore: split unclaimed_reg_debug() to header and footer
  drm/i915/uncore: fix race around i915->params.mmio_debug
  drm/i915/uncore: optimize CONFIG_DRM_I915_DEBUG_MMIO=n more

 drivers/gpu/drm/i915/intel_uncore.c | 47 ++++++++++++++++++-----------
 1 file changed, 29 insertions(+), 18 deletions(-)

-- 
2.39.2


             reply	other threads:[~2023-07-04  9:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04  9:48 Jani Nikula [this message]
2023-07-04  9:48 ` [Intel-gfx] [PATCH 1/3] drm/i915/uncore: split unclaimed_reg_debug() to header and footer Jani Nikula
2023-07-06 10:50   ` Tvrtko Ursulin
2023-07-04  9:48 ` [Intel-gfx] [PATCH 2/3] drm/i915/uncore: fix race around i915->params.mmio_debug Jani Nikula
2023-07-06 10:51   ` Tvrtko Ursulin
2023-07-04  9:48 ` [Intel-gfx] [PATCH 3/3] drm/i915/uncore: optimize CONFIG_DRM_I915_DEBUG_MMIO=n more Jani Nikula
2023-07-06 10:56   ` Tvrtko Ursulin
2023-07-06 12:06     ` Jani Nikula
2023-07-06 13:48       ` Tvrtko Ursulin
2023-07-25  3:01         ` Lee, Shawn C
2023-07-04 10:02 ` [Intel-gfx] [PATCH 0/3] drm/i915/uncore: unclaimed reg debug race fix and optimization Jani Nikula
2023-07-04 11:26 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2023-07-04 11:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-04 15:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=cover.1688463863.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.