public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Page faults to help user space debug
@ 2013-06-28 22:23 Ben Widawsky
  2013-06-28 22:23 ` [PATCH 1/6] drm/i915: Faults for scratch PTEs Ben Widawsky
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Ben Widawsky @ 2013-06-28 22:23 UTC (permalink / raw)
  To: Intel GFX; +Cc: Paul Berry, Ben Widawsky

This series originated from the request from Paul, "can you enable page
faults"?  After some though and discussion, we came up with 3 debug features to
implement:

1. echo 1 > /sys/kernel/debug/dri/0/i915_debug_flags
Make all scratch pages fault on access

2. echo 2 > /sys/kernel/debug/dri/0/i915_debug_flags
Unbind all buffers synchronously, so any batch which has bad code will fault
every time and not get lucky by hitting a buffer it bound. This will not catch
cases where it accidentally reads/writes someone else's buffer.

3. echo 4 > /sys/kernel/debug/dri/0/i915_debug_flags
Add an extra page to all user allocated objects which will fault when accessed.
This is meant to catch the case where mesa overruns one of it's local buffers.
It's meant to be a finer grained version of #1, and was a specific request.

Personally, I don't know how useful page faults are. The one time I tried to
turn it on previously, I remember getting a hard hang, but my memory if very
fuzzy.

Putt this out there for review, and hopefully for Paul to test as soon
as he has something read.


Ben Widawsky (6):
  drm/i915: Faults for scratch PTEs
  drm/i915: Debugfs for setting debug_flags
  drm/i915: Reset scratch pages when using debug_flags
  drm/i915: Synchronous execbuf for debug
  drm/i915: Let userspace create a faultable pad page
  drm/i915: distinguish pad and fault pages

 drivers/gpu/drm/i915/i915_debugfs.c        | 53 +++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.c            |  3 ++
 drivers/gpu/drm/i915/i915_drv.h            | 17 +++++--
 drivers/gpu/drm/i915/i915_gem.c            |  7 +++
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  7 ++-
 drivers/gpu/drm/i915/i915_gem_gtt.c        | 81 +++++++++++++++++++++++++-----
 6 files changed, 151 insertions(+), 17 deletions(-)

-- 
1.8.3.1

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

end of thread, other threads:[~2013-07-06 20:08 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28 22:23 [PATCH 0/6] Page faults to help user space debug Ben Widawsky
2013-06-28 22:23 ` [PATCH 1/6] drm/i915: Faults for scratch PTEs Ben Widawsky
2013-06-28 22:23 ` [PATCH 2/6] drm/i915: Debugfs for setting debug_flags Ben Widawsky
2013-06-28 22:23 ` [PATCH 3/6] drm/i915: Reset scratch pages when using debug_flags Ben Widawsky
2013-06-28 22:23 ` [PATCH 4/6] drm/i915: Synchronous execbuf for debug Ben Widawsky
2013-06-28 22:23 ` [PATCH 5/6] drm/i915: Let userspace create a faultable pad page Ben Widawsky
2013-06-28 22:23 ` [PATCH 6/6] drm/i915: distinguish pad and fault pages Ben Widawsky
2013-06-28 22:39 ` [PATCH 0/6] Page faults to help user space debug Chris Wilson
2013-06-28 23:30   ` Ben Widawsky
2013-06-29  7:02     ` Chris Wilson
2013-07-02 19:00   ` Paul Berry
2013-07-02 19:03     ` Chris Wilson
2013-07-02 19:18       ` Paul Berry
2013-07-06 20:11         ` Ben Widawsky
2013-07-02 19:04     ` Ben Widawsky
2013-06-29 14:38 ` Daniel Vetter
2013-06-29 21:20   ` Ben Widawsky
2013-06-29 21:28     ` Daniel Vetter

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