Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Daniel Vetter
On Tue, Oct 10, 2017 at 3:39 PM, Chris Wilson wrote: > Style nits: > > Quoting Daniel Vetter (2017-10-09 17:44:01) >> diff --git a/drivers/gpu/drm/i915/i915_gem.c >> b/drivers/gpu/drm/i915/i915_gem.c >> index 82a10036fb38..8d7d8d1f78db 100644 >> --- a/drivers/gpu/drm/i915/i915_gem.c >> +++ b/driv

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Chris Wilson
Style nits: Quoting Daniel Vetter (2017-10-09 17:44:01) > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 82a10036fb38..8d7d8d1f78db 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -3057,49 +3057,71 @@ static void n

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Chris Wilson
Quoting Chris Wilson (2017-10-10 10:21:45) > Quoting Daniel Vetter (2017-10-09 17:44:01) > > stop_machine is not really a locking primitive we should use, except > > when the hw folks tell us the hw is broken and that's the only way to > > work around it. > > > > This patch tries to address the lo

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Daniel Vetter
On Tue, Oct 10, 2017 at 12:50:45PM +0300, Mika Kuoppala wrote: > Daniel Vetter writes: > > > stop_machine is not really a locking primitive we should use, except > > when the hw folks tell us the hw is broken and that's the only way to > > work around it. > > > > This patch tries to address the l

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Daniel Vetter
On Tue, Oct 10, 2017 at 10:21:45AM +0100, Chris Wilson wrote: > Quoting Daniel Vetter (2017-10-09 17:44:01) > > stop_machine is not really a locking primitive we should use, except > > when the hw folks tell us the hw is broken and that's the only way to > > work around it. > > > > This patch trie

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Mika Kuoppala
Daniel Vetter writes: > stop_machine is not really a locking primitive we should use, except > when the hw folks tell us the hw is broken and that's the only way to > work around it. > > This patch tries to address the locking abuse of stop_machine() from > > commit 20e4933c478a1ca694b38fa4ac44d9

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-10 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-09 17:44:01) > stop_machine is not really a locking primitive we should use, except > when the hw folks tell us the hw is broken and that's the only way to > work around it. > > This patch tries to address the locking abuse of stop_machine() from > > commit 20e4933c

[Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-09 Thread Daniel Vetter
stop_machine is not really a locking primitive we should use, except when the hw folks tell us the hw is broken and that's the only way to work around it. This patch tries to address the locking abuse of stop_machine() from commit 20e4933c478a1ca694b38fa4ac44d99e659941f5 Author: Chris Wilson Dat

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-09 Thread Daniel Vetter
On Fri, Oct 06, 2017 at 06:37:52PM +0100, Chris Wilson wrote: > Quoting Daniel Vetter (2017-10-06 15:20:09) > > On Fri, Oct 06, 2017 at 12:03:49PM +0100, Chris Wilson wrote: > > > Quoting Daniel Vetter (2017-10-06 10:06:37) > > > > stop_machine is not really a locking primitive we should use, excep

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-09 Thread Daniel Vetter
On Fri, Oct 06, 2017 at 06:29:08PM +0100, Chris Wilson wrote: > Quoting Daniel Vetter (2017-10-06 15:20:09) > > On Fri, Oct 06, 2017 at 12:03:49PM +0100, Chris Wilson wrote: > > > Quoting Daniel Vetter (2017-10-06 10:06:37) > > > > stop_machine is not really a locking primitive we should use, excep

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-06 15:20:09) > On Fri, Oct 06, 2017 at 12:03:49PM +0100, Chris Wilson wrote: > > Quoting Daniel Vetter (2017-10-06 10:06:37) > > > stop_machine is not really a locking primitive we should use, except > > > when the hw folks tell us the hw is broken and that's the only

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-06 15:20:09) > On Fri, Oct 06, 2017 at 12:03:49PM +0100, Chris Wilson wrote: > > Quoting Daniel Vetter (2017-10-06 10:06:37) > > > stop_machine is not really a locking primitive we should use, except > > > when the hw folks tell us the hw is broken and that's the only

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Daniel Vetter
On Fri, Oct 06, 2017 at 12:03:49PM +0100, Chris Wilson wrote: > Quoting Daniel Vetter (2017-10-06 10:06:37) > > stop_machine is not really a locking primitive we should use, except > > when the hw folks tell us the hw is broken and that's the only way to > > work around it. > > > > This patch trie

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Daniel Vetter
On Fri, Oct 06, 2017 at 12:12:41PM +0200, Thomas Gleixner wrote: > On Fri, 6 Oct 2017, Chris Wilson wrote: > > Quoting Daniel Vetter (2017-10-06 10:06:37) > > > stop_machine is not really a locking primitive we should use, except > > > when the hw folks tell us the hw is broken and that's the only

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Peter Zijlstra
On Fri, Oct 06, 2017 at 12:12:41PM +0200, Thomas Gleixner wrote: > So if you don't have a compelling technical reason to > use it, then it _is_ the wrong tool. This. stop_machine() effectively takes down _all_ CPUs for the duration of your callback. That is something you really should avoid at pre

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Peter Zijlstra
On Fri, Oct 06, 2017 at 11:06:37AM +0200, Daniel Vetter wrote: > I pondered whether we should annotate engine->submit_request as __rcu > and use rcu_assign_pointer and rcu_dereference on it. But the reason > behind those is to make sure the compiler/cpu barriers are there for > when you have an ac

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-06 10:06:37) > stop_machine is not really a locking primitive we should use, except > when the hw folks tell us the hw is broken and that's the only way to > work around it. > > This patch tries to address the locking abuse of stop_machine() from > > commit 20e4933c

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Thomas Gleixner
On Fri, 6 Oct 2017, Chris Wilson wrote: > Quoting Daniel Vetter (2017-10-06 10:06:37) > > stop_machine is not really a locking primitive we should use, except > > when the hw folks tell us the hw is broken and that's the only way to > > work around it. > > > > This patch tries to address the locki

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-06 10:06:37) > stop_machine is not really a locking primitive we should use, except > when the hw folks tell us the hw is broken and that's the only way to > work around it. > > This patch tries to address the locking abuse of stop_machine() from > > commit 20e4933c

[Intel-gfx] [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in set_wedged

2017-10-06 Thread Daniel Vetter
stop_machine is not really a locking primitive we should use, except when the hw folks tell us the hw is broken and that's the only way to work around it. This patch tries to address the locking abuse of stop_machine() from commit 20e4933c478a1ca694b38fa4ac44d99e659941f5 Author: Chris Wilson Dat