[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070723153437.4fc62253.akpm@linux-foundation.org>
Date: Mon, 23 Jul 2007 15:34:37 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Robin Getz <rgetz@...ckfin.uclinux.org>
Cc: "Mike Frysinger" <vapier.adi@...il.com>,
linux-kernel@...r.kernel.org, "Greg Ungerer" <gerg@...pgear.com>,
"Russell King" <rmk@....linux.org.uk>,
"Paul Mundt" <lethal@...ux-sh.org>,
"Tim Bird" <tim.bird@...sony.com>, bryan.wu@...log.com
Subject: Re: early_printk accessing __log_buf
On Mon, 23 Jul 2007 18:15:37 -0400
Robin Getz <rgetz@...ckfin.uclinux.org> wrote:
> On Mon 23 Jul 2007 16:15, Andrew Morton pondered:
> > This code would be
> > simpler if it did not attempt to read more than one char at a time. It
> > will be plenty fast enough.
>
> When systems have NMI kick off due to power failure, and you want to grab the
> log buffer to write it to flash before power really dies - every cycle
> counts.
>
> A single function which does the copy as a loop (existing) is going to be much
> faster than the overhead of 1024 function calls to copy the last k.
I'd expect the overhead of the (fully-cached) instructions to be
insignificant compared to the time to write to flash?
> > The magical interpretation of len isn't very nice.
>
> There are lots of places in the kernel which have magic in them :)
Lots of the kernel is pretty crappy. One of our main tools for fixing that is to
ensure that new stuff is non-crappy.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists