From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 1/1] powerpc: Ignore IPIs to offline CPUs From: Michael Ellerman To: Brian King In-Reply-To: <4BCE6DDC.4020902@linux.vnet.ibm.com> References: <201004210154.o3L1sXaR001791@d01av04.pok.ibm.com> <12054.1271815478@neuling.org> <4BCE6DDC.4020902@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-iRhnuhzSWUgFmGlvswSD" Date: Wed, 21 Apr 2010 23:35:29 +1000 Message-ID: <1271856929.3832.46.camel@concordia> Mime-Version: 1.0 Cc: Michael Neuling , linuxppc-dev@lists.ozlabs.org Reply-To: michael@ellerman.id.au List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --=-iRhnuhzSWUgFmGlvswSD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2010-04-20 at 22:15 -0500, Brian King wrote: > On 04/20/2010 09:04 PM, Michael Neuling wrote: > > In message <201004210154.o3L1sXaR001791@d01av04.pok.ibm.com> you wrote: > >> > >> Since there is nothing to stop an IPI from occurring to an > >> offline CPU, rather than printing a warning to the logs, > >> just ignore the IPI. This was seen while stress testing > >> SMT enable/disable. > >=20 > > This seems like a recipe for disaster. Do we at least need a > > WARN_ON_ONCE? >=20 > Actually we are only seeing it once per offlining of a CPU, > and only once in a while. > =20 > My guess is that once the CPU is marked offline fewer IPIs > get sent to it since its no longer in the online mask. Hmm, right. Once it's offline it shouldn't get _any_ IPIs, AFAICS. > Perhaps we should be disabling IPIs to offline CPUs instead? You mean not sending them? We do: void smp_xics_message_pass(int target, int msg) { unsigned int i; if (target < NR_CPUS) { smp_xics_do_message(target, msg); } else { for_each_online_cpu(i) { if (target =3D=3D MSG_ALL_BUT_SELF && i =3D=3D smp_processor_id()) continue; smp_xics_do_message(i, msg); } } } =20 So it does sound like the IPI was sent while the cpu was online (ie. before pseries_cpu_disable(), but xics_migrate_irqs_away() has not caused the IPI to be cancelled. Problem is I don't think we can just ignore the IPI. The IPI might have been sent for a smp_call_function() which is waiting for the result, in which case if we ignore it the caller will block for ever. I don't see how to fix it :/ cheers --=-iRhnuhzSWUgFmGlvswSD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkvO/yEACgkQdSjSd0sB4dIf+ACcCm+mYfXI+kJNrXpPA/LE3drA r0AAoI81RaLq4MKBxAO2nNRlvD4l89Rs =/haO -----END PGP SIGNATURE----- --=-iRhnuhzSWUgFmGlvswSD--