Received: from mx3.mail.elte.hu ([157.181.1.138]) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1MxQMO-0004Zc-67 for linux-mtd@lists.infradead.org; Mon, 12 Oct 2009 19:15:13 +0000 Date: Mon, 12 Oct 2009 21:14:53 +0200 From: Ingo Molnar To: Linus Torvalds Subject: Re: [PATCH] panic.c: export panic_on_oops Message-ID: <20091012191453.GK17138@elte.hu> References: <20091012120951.GA16799@elte.hu> <1255349748.10605.13.camel@macbook.infradead.org> <20091012122023.GA19365@elte.hu> <20091012150650.51a4b4dc@marrow.netinsight.se> <20091012131528.GC25464@elte.hu> <20091012153937.0dcd73e5@marrow.netinsight.se> <20091012110954.67d7d8d8.akpm@linux-foundation.org> <20091012182346.GH17138@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: Artem Bityutskiy , LKML , "Koskinen Aaro \(Nokia-D/Helsinki\)" , linux-mtd , Simon Kagstrom , Andrew Morton , David Woodhouse , Alan Cox List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , * Linus Torvalds wrote: > > > On Mon, 12 Oct 2009, Ingo Molnar wrote: > > > > * Andrew Morton wrote: > > > > > > Perhaps oops_enter() is a good place to mark the start of the log, and > > > flush it within oops_exit(). > > > > Simplest would be to do the last 2K in oops_exit()? That gives the > > oops, and the history leading up to it. Since the blocking is 2K, > > the extra log output is for free. > > I agree, except I don't think it should be fixed to 2k. Yeah - i cited 2K only because that is what mtdoops uses. > void dump_kmsg(void) > [...] > > Look ma, no locking, no buffer allocations, no nothing. Neat ... This could also be used for a warm-reboot preserve-memory thing as well. A well-known 4K (or so) area to preserve and print out during the next bootup after a crash. dump_kmsg() could copy the kernel's last will out to that area, or so. That would be cross-kernel compatible and the newly booted kernel image wouldnt overwrite this area. (which it does currently via its __log_buf[]) Ingo