From: Greg KH <gregkh@suse.de>
To: Tim Bird <tim.bird@am.sony.com>
Cc: linux-embedded <linux-embedded@vger.kernel.org>,
linux kernel <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>, john stultz <johnstul@us.ibm.com>,
Brian Swetland <swetland@google.com>,
Kay Sievers <kay.sievers@vrfy.org>,
Lennart Poettering <lennart@poettering.net>
Subject: Re: RFC: android logger feedback request
Date: Wed, 21 Dec 2011 16:51:14 -0800 [thread overview]
Message-ID: <20111222005114.GA22541@suse.de> (raw)
In-Reply-To: <4EF27B85.9080801@am.sony.com>
On Wed, Dec 21, 2011 at 04:36:21PM -0800, Tim Bird wrote:
> On 12/21/2011 03:19 PM, Greg KH wrote:
> > That all describes the current code, but you haven't described what's
> > wrong with the existing syslog interface that requires this new driver
> > to be written. And why can't the existing interface be fixed to address
> > these (potential) shortcomings?
>
>
> >> One specific question I have is where is the most appropriate
> >> place for this code to live, in the kernel source tree?
> >> Other embedded systems might want to use this system (it
> >> is simpler than syslog, and superior in some ways), so I don't
> >> think it should remain in an android-specific directory.
> >
> > What way is it superior?
>
> Here are some ways that this code is superior to syslog:
>
> Speed and overhead
> ------------------
> syslogd requires a separate user-space process to manage
> the log area, where this code does not. The overhead
> for any user-space process is at least 16K, and usually much
> more than this (not including the size of the log storage
> area). On one of my embedded systems, where syslogd is
> provided by busybox, the unique set size for syslogd
> is 96K. This code, built in to the Linux kernel is less
> than 4K code and data (again, not including the size of
> the log storage area).
Huh, I'm not talking about syslogd, I'm talking about the syslog(2)
syscall we have.
This character interface seems very close to the syslog(2) api, but just
done in a character interface, with ioctls, which also require userspace
tools to manage properly, so I fail to see the big "gain" here.
What am I missing?
> To deliver a message to syslog requires a socket operation
> and a few context switches.
For syslog(2)? What socket?
> With the logger code,
> the operation is a file operation (writev) to kernel memory,
> with only one context switch into and out of the kernel.
I think we are thinking of different apis here...
> No dependence on persistent storage
> -----------------------------------
> syslogd requires either persistent storage to store the log,
> or a network connection to an outside device. Being
> purely memory-based, the logger requires neither of these.
> With logger, persistence of the log data is left to the
> implementor. In Android, the data is delivered over a USB
> connection via adb or to the console as ascii text, using
> logcat. In other embedded systems, other mechanisms might
> be used if long-term storage of the messages is desired.
> With logger, there is no automatic notion of on-device
> persistent storage for the log data.
>
> No dependence on networking kernel code
> ---------------------------------------
> The syslog communication mechanism requires sockets. This
> prevents one from configuring the kernel with no networking
> support, which is sometimes done in embedded systems to save
> size.
>
> Simpler constraint on log size
> ------------------------------
> The busybox syslog daemon uses a log rotation feature to constrain
> the size of the log in persistent storage. This is overly
> cumbersome in both speed and complexity compared to the logger's
> simple ring buffer.
>
> Licensing
> ---------
> The code implementing library and command line tool support
> for this logger (in user space) is available under an Apache license,
> rather than a GPL license, which is desirable for some vendors.
Ok, care to rewrite all of this when thinking of syslog(2), the kernel
system call, and not syslogd, which is what I was not comparing this
kernel driver to at all?
> > How does this tie into Kay
> > and Lennard's proposal for work in this area?
>
> It does not tie in at all.
>
> Kay and Lennart's proposal for "the Journal" creates
> a more complex system than syslog, and handles a number
> of new interesting use cases. This system is on the
> opposite side of the spectrum from the journal, towards
> simplicity and reduced footprint and overhead.
No, it's much the same, for the kernel side, which is what I am
referring to here.
greg k-h
next prev parent reply other threads:[~2011-12-22 0:51 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 22:59 RFC: android logger feedback request Tim Bird
2011-12-21 23:19 ` Greg KH
2011-12-22 0:18 ` john stultz
2011-12-22 0:27 ` Greg KH
2011-12-22 0:47 ` john stultz
2011-12-22 1:09 ` john stultz
2011-12-22 0:42 ` Tim Bird
2011-12-22 0:49 ` john stultz
2011-12-22 1:00 ` john stultz
2011-12-22 0:36 ` Tim Bird
2011-12-22 0:51 ` Greg KH [this message]
2011-12-22 1:32 ` Tim Bird
2011-12-22 1:47 ` Greg KH
2011-12-22 2:12 ` Tim Bird
2011-12-22 3:44 ` Kay Sievers
2011-12-22 3:45 ` Greg KH
2011-12-22 3:47 ` Greg KH
2011-12-22 4:12 ` Kay Sievers
2011-12-22 4:22 ` Brian Swetland
2011-12-22 4:43 ` Kay Sievers
2011-12-22 4:47 ` david
2011-12-22 4:58 ` Brian Swetland
2011-12-22 5:07 ` david
2011-12-22 5:21 ` david
2011-12-22 13:40 ` Lennart Poettering
2011-12-22 4:49 ` david
2011-12-22 2:34 ` Kay Sievers
2011-12-22 1:20 ` NeilBrown
2011-12-22 1:49 ` Greg KH
2011-12-22 2:14 ` Tim Bird
2011-12-22 2:34 ` Brian Swetland
2011-12-22 3:49 ` Greg KH
2011-12-22 4:36 ` Kay Sievers
2011-12-22 5:01 ` david
2011-12-22 4:52 ` david
2011-12-22 5:06 ` Brian Swetland
2011-12-22 5:14 ` david
2011-12-22 5:25 ` Brian Swetland
2011-12-22 6:09 ` Greg KH
2011-12-23 15:22 ` Alan Cox
2011-12-23 16:29 ` Greg KH
2011-12-22 7:05 ` NeilBrown
2012-01-06 20:56 ` Tim Bird
2012-01-06 21:20 ` Greg KH
2012-01-06 22:41 ` Tim Bird
2012-01-06 23:17 ` Greg KH
2012-01-06 23:35 ` Greg KH
2011-12-22 14:59 ` Arnd Bergmann
2011-12-22 15:13 ` Kay Sievers
2011-12-22 4:42 ` david
2011-12-22 0:59 ` David Brown
2011-12-29 0:39 ` Andrew Morton
2012-01-04 15:34 ` Geunsik Lim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111222005114.GA22541@suse.de \
--to=gregkh@suse.de \
--cc=arnd@arndb.de \
--cc=johnstul@us.ibm.com \
--cc=kay.sievers@vrfy.org \
--cc=lennart@poettering.net \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swetland@google.com \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).