[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1710061205120.1836@nanos>
Date: Fri, 6 Oct 2017 12:12:41 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Chris Wilson <chris@...is-wilson.co.uk>
cc: Daniel Vetter <daniel.vetter@...ll.ch>,
Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
LKML <linux-kernel@...r.kernel.org>,
Mika Kuoppala <mika.kuoppala@...el.com>,
Marta Lofstedt <marta.lofstedt@...el.com>,
Daniel Vetter <daniel.vetter@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] drm/i915: Use rcu instead of stop_machine in
set_wedged
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 locking abuse of stop_machine() from
> >
> > commit 20e4933c478a1ca694b38fa4ac44d99e659941f5
> > Author: Chris Wilson <chris@...is-wilson.co.uk>
> > Date: Tue Nov 22 14:41:21 2016 +0000
> >
> > drm/i915: Stop the machine as we install the wedged submit_request handler
> >
> > Chris said parts of the reasons for going with stop_machine() was that
> > it's no overhead for the fast-path. But these callbacks use irqsave
> > spinlocks and do a bunch of MMIO, and rcu_read_lock is _real_ fast.
>
> I still want a discussion of the reason why keeping the normal path clean
> and why an alternative is sought, here. That design leads into vv
stop_machine() is the least resort when serialization problems cannot be
solved otherwise. We try to avoid it where ever we can. While on the call
site it looks simple, it's invasive in terms of locking as shown by the
lockdep splat and it's imposing latencies and other side effects on all
CPUs in the system. So if you don't have a compelling technical reason to
use it, then it _is_ the wrong tool.
As Daniel has shown it's not required, so there is no technical reason why
stomp_machine() has to be used here.
Thanks,
tglx
Powered by blists - more mailing lists