Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-03-13 Thread Andi Shyti
Hi Chris, > We [will] expose various per-engine scheduling controls. One of which, > 'preempt_timeout_ms', defines how we wait for a preemption request to be > honoured by the currently executing context. If it fails to relieve the > GPU within the required timeout, the engine is reset and the

[Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-03-11 Thread Chris Wilson
We [will] expose various per-engine scheduling controls. One of which, 'preempt_timeout_ms', defines how we wait for a preemption request to be honoured by the currently executing context. If it fails to relieve the GPU within the required timeout, the engine is reset and the miscreant forcibly

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-29 Thread Chris Wilson
Quoting Chris Wilson (2020-02-29 18:34:49) > Quoting Andi Shyti (2020-02-29 12:45:27) > > > > > > > + char buf[512]; > > > > > > > + int len; > > > > > > > + > > > > > > > + lseek(engines, 0, SEEK_SET); > > > > > > > + while ((len = syscall(SYS_getdents64, engines, buf, > > > > >

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-29 Thread Chris Wilson
Quoting Andi Shyti (2020-02-29 12:45:27) > > > > > > + char buf[512]; > > > > > > + int len; > > > > > > + > > > > > > + lseek(engines, 0, SEEK_SET); > > > > > > + while ((len = syscall(SYS_getdents64, engines, buf, > > > > > > sizeof(buf))) > 0) { > > > > > > + void

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-29 Thread Andi Shyti
> > > > > + char buf[512]; > > > > > + int len; > > > > > + > > > > > + lseek(engines, 0, SEEK_SET); > > > > > + while ((len = syscall(SYS_getdents64, engines, buf, > > > > > sizeof(buf))) > 0) { > > > > > + void *ptr = buf; > > > > > + > > > > > + while

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-29 Thread Chris Wilson
Quoting Andi Shyti (2020-02-28 23:51:24) > > > > +void dyn_sysfs_engines(int i915, int engines, const char *file, > > > > +void (*test)(int, int)) > > > > +{ > > > > + char buf[512]; > > > > + int len; > > > > + > > > > + lseek(engines, 0, SEEK_SET); > > > > +

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-28 Thread Andi Shyti
> > > +void dyn_sysfs_engines(int i915, int engines, const char *file, > > > +void (*test)(int, int)) > > > +{ > > > + char buf[512]; > > > + int len; > > > + > > > + lseek(engines, 0, SEEK_SET); > > > + while ((len = syscall(SYS_getdents64, engines, buf,

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-28 Thread Andi Shyti
Hi Chris, > +static int create_ext_ioctl(int i915, > + struct drm_i915_gem_context_create_ext *arg) > +{ > + int err; > + > + err = 0; > + if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) { > + err = -errno; > +

Re: [Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-28 Thread Chris Wilson
Quoting Andi Shyti (2020-02-28 23:27:04) > Hi Chris, > > > +static int create_ext_ioctl(int i915, > > + struct drm_i915_gem_context_create_ext *arg) > > +{ > > + int err; > > + > > + err = 0; > > + if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT,

[Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-02-28 Thread Chris Wilson
We [will] expose various per-engine scheduling controls. One of which, 'preempt_timeout_ms', defines how we wait for a preemption request to be honoured by the currently executing context. If it fails to relieve the GPU within the required timeout, the engine is reset and the miscreant forcibly

[Intel-gfx] [PATCH i-g-t 3/5] i915: Exercise preemption timeout controls in sysfs

2020-01-27 Thread Chris Wilson
We [will] expose various per-engine scheduling controls. One of which, 'preempt_timeout_ms', defines how we wait for a preemption request to be honoured by the currently executing context. If it fails to relieve the GPU within the required timeout, the engine is reset and the miscreant forcibly