Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/3] drm/i915/uncore: unclaimed reg debug race fix and optimization
@ 2023-07-04  9:48 Jani Nikula
  2023-07-04  9:48 ` [Intel-gfx] [PATCH 1/3] drm/i915/uncore: split unclaimed_reg_debug() to header and footer Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Jani Nikula @ 2023-07-04  9:48 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-25  3:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04  9:48 [Intel-gfx] [PATCH 0/3] drm/i915/uncore: unclaimed reg debug race fix and optimization Jani Nikula
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox