From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbcFNLhv (ORCPT ); Tue, 14 Jun 2016 07:37:51 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49473 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbcFNLhp (ORCPT ); Tue, 14 Jun 2016 07:37:45 -0400 Message-ID: <1465904254.3529.234.camel@decadent.org.uk> Subject: Re: [PATCH 3.16 012/114] drm/i915: Exit cherryview_irq_handler() after one pass From: Ben Hutchings To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, akpm@linux-foundation.org, Chris Wilson , Jani Nikula , Tvrtko Ursulin , Antti =?ISO-8859-1?Q?Koskip=E4=E4?= Date: Tue, 14 Jun 2016 12:37:34 +0100 In-Reply-To: <20160614104709.GT4329@intel.com> References: <20160614104709.GT4329@intel.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-a87+fMXk5axILYbFG9y3" X-Mailer: Evolution 3.20.2-2 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-a87+fMXk5axILYbFG9y3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2016-06-14 at 13:47 +0300, Ville Syrj=C3=A4l=C3=A4 wrote: > On Mon, Jun 13, 2016 at 07:36:37PM +0100, Ben Hutchings wrote: > > 3.16.36-rc1 review patch.=C2=A0=C2=A0If anyone has any objections, plea= se let me know. >=20 > Do not backport this one. It'll break things. But this has not been re-reverted in mainline, has it? =C2=A0Is it that 3.16-stable would need more changes backported to make this work, or is mainline currently broken on Cherryview hardware? Ben. > >=20 > > ------------------ > >=20 > > From: Chris Wilson > >=20 > > commit 9dbaab56ac09f07a73fe83bf69bec3e31060080a upstream. > >=20 > > This effectively reverts > >=20 > > commit 8e5fd599eb219f1054e39b40d18b217af669eea9 > > Author: Ville Syrj=C3=A4l=C3=A4 > > Date:=C2=A0=C2=A0=C2=A0Wed Apr 9 13:28:50 2014 +0300 > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0drm/i915/chv: Make CHV irq handler loop until a= ll interrupts are consumed > >=20 > > as under continuous execlists load we can saturate the IRQ handler, > > destablising the tsc clock and triggering the NMI watchdog to declare a= hung > > CPU. > >=20 > > [=C2=A0=C2=A0552.756051] clocksource: timekeeping watchdog on CPU0: Mar= king clocksource 'tsc' as unstable because the skew is too large: > > [=C2=A0=C2=A0552.756080] clocksource:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'refined-jiffies' wd_now: 10003b480 wd_last: = 10003b28c mask: ffffffff > > [=C2=A0=C2=A0552.756091] clocksource:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0'tsc' cs_now: d55d31aa50 cs_last: d17446166c = mask: ffffffffffffffff > > [=C2=A0=C2=A0552.756210] clocksource: Switched to clocksource refined-j= iffies > > [=C2=A0=C2=A0575.217870] NMI watchdog: Watchdog detected hard LOCKUP on= cpu 1 > > [=C2=A0=C2=A0575.217893] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.5.= 0-rc7+ #18 > > [=C2=A0=C2=A0575.217905] Hardware name:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0/NUC5CPYB, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 > > [=C2=A0=C2=A0575.217915]=C2=A0=C2=A00000000000000000 ffff88027fd05bc0 f= fffffff81288c6d 0000000000000000 > > [=C2=A0=C2=A0575.217935]=C2=A0=C2=A00000000000000001 ffff88027fd05be0 f= fffffff810e72d1 0000000000000000 > > [=C2=A0=C2=A0575.217951]=C2=A0=C2=A0ffff88027fd05c80 ffff88027fd05c20 f= fffffff81114b60 0000000181015f1e > > [=C2=A0=C2=A0575.217967] Call Trace: > > [=C2=A0=C2=A0575.217973]=C2=A0=C2=A0=C2=A0=C2=A0[] dump_stack+0x4f/0x72 > > [=C2=A0=C2=A0575.217994]=C2=A0=C2=A0[] watchdog_overflow_callback+0x151= /0x160 > > [=C2=A0=C2=A0575.218003]=C2=A0=C2=A0[] __perf_event_overflow+0xa0/0x1e0 > > [=C2=A0=C2=A0575.218016]=C2=A0=C2=A0[] perf_event_overflow+0x14/0x20 > > [=C2=A0=C2=A0575.218028]=C2=A0=C2=A0[] intel_pmu_handle_irq+0x1da/0x460 > > [=C2=A0=C2=A0575.218042]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218052]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218064]=C2=A0=C2=A0[] perf_event_nmi_handler+0x28/0x50 > > [=C2=A0=C2=A0575.218075]=C2=A0=C2=A0[] nmi_handle+0x60/0x130 > > [=C2=A0=C2=A0575.218086]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218096]=C2=A0=C2=A0[] do_nmi+0x140/0x470 > > [=C2=A0=C2=A0575.218108]=C2=A0=C2=A0[] end_repeat_nmi+0x1a/0x1e > > [=C2=A0=C2=A0575.218119]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218129]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218139]=C2=A0=C2=A0[] ? poll_idle+0x3e/0x70 > > [=C2=A0=C2=A0575.218148]=C2=A0=C2=A0<>=C2=A0=C2=A0[] cpuidle_enter_stat= e+0xf3/0x2f0 > > [=C2=A0=C2=A0575.218164]=C2=A0=C2=A0[] cpuidle_enter+0x17/0x20 > > [=C2=A0=C2=A0575.218175]=C2=A0=C2=A0[] call_cpuidle+0x2a/0x40 > > [=C2=A0=C2=A0575.218185]=C2=A0=C2=A0[] cpu_startup_entry+0x273/0x330 > > [=C2=A0=C2=A0575.218196]=C2=A0=C2=A0[] start_secondary+0x10e/0x130 > >=20 > > However, not servicing all available IIR within the handler does hurt t= he > > throughput of pathological nop execbuf by about 20%, with a similar eff= ect > > upon the dispatch latency of a series of execbuf. > >=20 > > v2: use do {} while(0) for a smaller patch, and easier to revert again > >=20 > > I have reasonable confidence that we do not miss GT interrupts (as > > execlists provides a stress case with a failure mechanism easily > > detected by igt), however I have less confidence about all the other > > sources of interrupts and worry that may lose a display hotplug > > interrupt, for example. > >=20 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D93467 > > Testcase: igt/gem_exec_nop/basic # requires NMI watchdog > > Signed-off-by: Chris Wilson > > Cc: Ville Syrj=C3=A4l=C3=A4 > > Cc: Antti Koskip=C3=A4=C3=A4 > > Cc: Tvrtko Ursulin > > Reviewed-by: Tvrtko Ursulin > > Reviewed-by: Ville Syrj=C3=A4l=C3=A4 > > Link: http://patchwork.freedesktop.org/patch/msgid/1457946117-6714-1-gi= t-send-email-chris@chris-wilson.co.uk > > (cherry picked from commit 579de73b048a0a4c66c25a033ac76a2836e0cf73) > > Signed-off-by: Jani Nikula > > Signed-off-by: Ben Hutchings > > --- > > =C2=A0drivers/gpu/drm/i915/i915_irq.c | 4 ++-- > > =C2=A01 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > --- a/drivers/gpu/drm/i915/i915_irq.c > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > @@ -1875,7 +1875,7 @@ static irqreturn_t cherryview_irq_handle > > =C2=A0 u32 master_ctl, iir; > > =C2=A0 irqreturn_t ret =3D IRQ_NONE; > > =C2=A0 > > - for (;;) { > > + do { > > =C2=A0 master_ctl =3D I915_READ(GEN8_MASTER_IRQ) & ~GEN8_MASTER_IRQ_CO= NTROL; > > =C2=A0 iir =3D I915_READ(VLV_IIR); > > =C2=A0 > > @@ -1897,7 +1897,7 @@ static irqreturn_t cherryview_irq_handle > > =C2=A0 POSTING_READ(GEN8_MASTER_IRQ); > > =C2=A0 > > =C2=A0 ret =3D IRQ_HANDLED; > > - } > > + } while (0); > > =C2=A0 > > =C2=A0 return ret; > > =C2=A0} >=20 --=20 Ben Hutchings We get into the habit of living before acquiring the habit of thinking. =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0- A= lbert Camus --=-a87+fMXk5axILYbFG9y3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXX+x+AAoJEOe/yOyVhhEJZ3sP/Ar5HMaygHpAFHZ0QMcmcC8j q2nYOOypbj7QmxKveofPtgNz4PV+X04VtunnmhVfIO2SNG5DceC9B9LCfGDEq/EV wiGALBZdoce9qKVanFQ3hqLP+o4YA7hz0I+2zqN7lBObv4CmBHz9/982q4ZDNagE Uq0fvWekiOPjgsSyRO20bBBLVIm8RK0cRqtAiRMko71Sxv+R5STs3SW1MyLGMmH7 lf5SkgLBak/LPD5s9om4vLXV+aBR4XbagvB2yOV+4e2/5skctNwzX/kC4VzRtL7q sIkG3zcc8ejET+REItUhzAGp1nPcR16LY0YLhxWiy2I3fa8bY2c/Q2anXWW62aQK mmaneWQZxjgNavKu5eqHJnwSsqzthFnNRj60wawUFGq8sMTJBP96d8hGsTb3BP1D 19Lrhj9AtBoUWC8eFLxBr2tVKJh6/wb+2XE0qhzreC4qPiv870PE1KFrjeJYu13X D7Ee59fWeUOJrwEGQgE/ZrzfOq713HClrvVbUZvGVrs35+XLxg98VNTZXZRYKrH0 /529XRrRLsCyxzvQJBxHdEHi7V3WyosaHQjVibkyWiZi7B62GLWaxWO4llxE+1g4 4Wv4iOGFsx7nJ/XOF3ZZrGXI8B1Wg6oKNJKOE+FBau9WuVKCp2aoQHiVC0k1m0Kt Z56TR+KQlMWEd75AJwDH =IFwm -----END PGP SIGNATURE----- --=-a87+fMXk5axILYbFG9y3--