From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755442AbcBWVHK (ORCPT ); Tue, 23 Feb 2016 16:07:10 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41462 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755279AbcBWVHI (ORCPT ); Tue, 23 Feb 2016 16:07:08 -0500 Message-ID: <1456261613.9099.0.camel@decadent.org.uk> Subject: Re: [STABLE] kernel oops which can be fixed by peterz's patches From: Ben Hutchings To: Mike Galbraith , Byungchul Park , Greg KH Cc: Peter Zijlstra , stable@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 23 Feb 2016 21:06:53 +0000 In-Reply-To: <1455678179.3531.15.camel@gmail.com> References: <20160105085211.GB3621@X58A-UD3R> <20160105091444.GZ6357@twins.programming.kicks-ass.net> <20160125072503.GB17836@X58A-UD3R> <20160216070837.GA5972@X58A-UD3R> <20160216084435.GQ6357@twins.programming.kicks-ass.net> <20160216174212.GB10487@kroah.com> <20160217001103.GB5972@X58A-UD3R> <20160217004139.GC3037@kroah.com> <20160217020008.GC5972@X58A-UD3R> <1455678179.3531.15.camel@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-NtLXtKfzSnlj1Zwe5OSi" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 92.40.248.141 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 --=-NtLXtKfzSnlj1Zwe5OSi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2016-02-17 at 04:02 +0100, Mike Galbraith wrote: [...] @stable: Kernels that predate SCHED_DEADLINE can use this simple (and teste= d) check in lieu of backport of the full 18 patch mainline treatment. Signed-off-by: Mike Galbraith --- =C2=A0kernel/sched/fair.c |=C2=A0=C2=A0=C2=A0=C2=A09 +++++++++ =C2=A01 file changed, 9 insertions(+) --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4008,6 +4008,7 @@ int can_migrate_task(struct task_struct =C2=A0 =C2=A0* 2) cannot be migrated to this CPU due to cpus_allowed, or =C2=A0 =C2=A0* 3) running (obviously), or =C2=A0 =C2=A0* 4) are cache-hot on their current CPU. + =C2=A0* 5) p->pi_lock is held. =C2=A0 =C2=A0*/ =C2=A0 if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu)) =C2=A0 return 0; @@ -4049,6 +4050,14 @@ int can_migrate_task(struct task_struct =C2=A0 } =C2=A0 =C2=A0 /* + =C2=A0* rt -> fair class change may be in progress.=C2=A0=C2=A0If we snea= k in should + =C2=A0* double_lock_balance() release rq->lock, and move the task, we wil= l + =C2=A0* cause switched_to_fair() to meet a passed but no longer valid rq. + =C2=A0*/ + if (raw_spin_is_locked(&p->pi_lock)) + return 0; + + /* =C2=A0 =C2=A0* Aggressive migration if: =C2=A0 =C2=A0* 1) task is cache cold, or =C2=A0 =C2=A0* 2) too many balance attempts have failed. Queued up for 3.2, thanks. Ben. --=20 Ben Hutchings Any smoothly functioning technology is indistinguishable from a rigged demo= . --=20 Ben Hutchings Any smoothly functioning technology is indistinguishable from a rigged demo= . --=-NtLXtKfzSnlj1Zwe5OSi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUAVszJ7ee/yOyVhhEJAQo4yQ/9FLX1EbA02X6djPxAloMFk/yR8cXN1h5u OrDSGtZkxJQVCoP0JpDe1JXCLijTCnH3MM+4n25ALzXc4jWv97FvSlErRC/ppr1G nfVdP+N81hlcSHszIIMPYxJSno7RStAZeasyxwt+O4PMV4uBNBZAfG6V6AUPVkQp p0ZZhhyIPcfxvPV/UlgyDTEfogQGVbXGCA252DfXEMswJIFTeaVAzNpzlU8I39Le Imq/3FyVdZZf4MgfH1y2TuUEOeua4oG6jLYpYzPlRvpOGK+vGqisnSvER4B/t0nj KAJdLXfxRo2io3ts3z85GenyW/ytHb2VGgcMBeIoBWKdXiqaUrPV1Vma77QNu5/1 7jSvqiDRcjgkrwrLZUDo6n1GCWhzRs7MtRZi+XFx/x6Ipcb1R6CmusLNwyz8E1oL +YvdSD4i5ARJduTf5oCZgBaZgw0/AMfWLKrZnk65T6vvFF5VTbl84mJT+UjeO1QI s9sjUy0TIKhcbeJkzf/aS2aK/RMda1DyhB/Bny+YKTynj5kI3VTf/07WoOhT8/O3 aubXigqVYTO4l/aajdTNH5zYWkrmlUJHpw6hvjrhffkfBuwG/mSVKr2Vb10O72VI HNmrcW9n9HZUWDIXdwTFqo/kgsyfnt8zUtJTudyKMlBF/8g/gvUH8YxLBShtNICo cDrQTpJ+0ag= =WO8m -----END PGP SIGNATURE----- --=-NtLXtKfzSnlj1Zwe5OSi--