From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Bottomley Subject: Re: [PATCH] kdump: Fix crash_kexec - smp_send_stop race in panic Date: Fri, 11 Nov 2011 06:30:08 -0600 Message-ID: <1321014608.5161.11.camel@dabdike.int.hansenpartnership.com> References: <1319639649.3321.11.camel@br98xy6r> <20111028161143.e5ebf617.akpm@linux-foundation.org> <1320055036.2796.8.camel@br98xy6r> <20111031033948.a0edb7f3.akpm@linux-foundation.org> <1320314844.2989.6.camel@br98xy6r> <20111109160400.cc2d27d9.akpm@linux-foundation.org> <1320934932.16425.14.camel@br98xy6r> <4EBBE9B4.3040009@tilera.com> <1321014494.2745.7.camel@br98xy6r> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1321014494.2745.7.camel@br98xy6r> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kexec-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Errors-To: kexec-bounces+glkk-kexec=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: holzheu-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org Cc: Benjamin Herrenschmidt , Heiko Carstens , David Howells , Chen Liqin , Paul Mackerras , "H. Peter Anvin" , Guan Xuetao , Lennox Wu , Hans-Christian Egtvedt , Jonas Bonn , Jesper Nilsson , Russell King , Yoshinori Sato , "David S. Miller" , Richard Weinberger , Hirokazu Takata , "James E.J. Bottomley" , Ingo Molnar , Geert Uytterhoeven , linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Matt Turner , Vivek Goyal , Haavard Skinnemoen List-Id: linux-arch.vger.kernel.org On Fri, 2011-11-11 at 13:28 +0100, Michael Holzheu wrote: > Hello Chris, > > On Thu, 2011-11-10 at 10:11 -0500, Chris Metcalf wrote: > > On 11/10/2011 9:22 AM, Michael Holzheu wrote: > > [snip] > > > If a cleaner API seems useful (either for power reasons or restartability > > or whatever), I suppose a standard global function name could be specified > > that's the thing you execute when you get an smp_send_stop IPI (in tile's > > case it's "smp_stop_cpu_interrupt()") and the panic() code could instead > > just do an atomic_inc_return() of a global panic counter, and if it wasn't > > the first panicking cpu, call directly into the smp_stop handler routine to > > quiesce itself. Then the panicking cpu could finish whatever it needs to > > do and then halt, reboot, etc., all the cpus. > > Thanks for the info. So introducing a "weak" function that can stop the > CPU it is running on could solve the problem. Every architecture can > override the function with something appropriate. E.g. "tile" can use > the lower-power "nap" instruction there. > > What about the following patch. Since we're discussing architecture stuff, could we move back to the architecture list? This thread keeps moving off it and it's not helping. James