[PATCH 0/6] Page faults to help user space debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux