From: Marcin Niesluchowski <m.niesluchow-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: Richard Weinberger
<richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"open list:ABI/API"
<linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Petr Mladek <pmladek-AlSwsSmVLrQ@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
Karol Lewandowski
<k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
Bartlomiej Zolnierkiewicz
<b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [RFC 0/8] Additional kmsg devices
Date: Fri, 03 Jul 2015 17:09:03 +0200 [thread overview]
Message-ID: <5596A58F.7090208@samsung.com> (raw)
In-Reply-To: <CAFLxGvxvaePEyCpLrB1cjNn4bvnCwt-_HE3zcT-6diMYNOraBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 07/03/2015 01:21 PM, Richard Weinberger wrote:
> On Fri, Jul 3, 2015 at 12:49 PM, Marcin Niesluchowski
> <m.niesluchow-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
>> Dear All,
>>
>> This series of patches extends kmsg interface with ability to dynamicaly
>> create (and destroy) kmsg-like devices which can be used by user space
>> for logging. Logging to kernel has number of benefits, including but not
>> limited to - always available, requiring no userspace, automatically
>> rotating and low overhead.
>>
>> User-space logging to kernel cyclic buffers was already successfully used
>> in android logger concept but it had certain flaws that this commits try
>> to address:
>> * drops hardcoded number of devices and static paths in favor for dynamic
>> configuration by ioctl interface in userspace
>> * extends existing driver instead of creating completely new one
> So, now we start moving syslogd into kernel land because userspace is
> too broken to provide
> decent logging?
>
> I can understand the systemd is using kmsg if no other logging service
> is available
> but I really don't think we should encourage other programs to do so.
>
> Why can't you just make sure that your target has a working
> syslogd/rsyslogd/journald/whatever?
> All can be done perfectly fine in userspace.
* Message credibility: Lets imagine simple service which collects logs
via unix sockets. There is no reliable way of identifying logging
process. getsockopt() with SO_PEERCRED option would give pid form cred
structure, but according to manual it may not be of actual logging process:
"The returned credentials are those that were in effect at the time
of the call to connect(2) or socketpair(2)."
- select(7)
* Early userspace tool: Helpful especially for embeded systems.
* Reliability: Userspace service may be killed due to out of memory
(OOM). This is kernel cyclic buffer, which size can be specified
differently according to situation.
* Possibility of using it with pstore: This code could be extended to
log additional buffers to persistent storage same way main (kmsg) log
buffer is.
* Use case of attaching file descriptor to stdout/stderr: Especially in
early userspace.
* Performance: Those services mentioned by You are weeker solutions in
that case. Especially systemd-journald is much too heavy soulution.
--
Best Regards,
Marcin Niesluchowski
next prev parent reply other threads:[~2015-07-03 15:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 10:49 [RFC 0/8] Additional kmsg devices Marcin Niesluchowski
[not found] ` <1435920595-30879-1-git-send-email-m.niesluchow-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-07-03 10:49 ` [RFC 1/8] printk: move code regarding log message storing format Marcin Niesluchowski
2015-07-03 10:49 ` [RFC 2/8] printk: add one function for storing log in proper format Marcin Niesluchowski
2015-07-03 10:49 ` [RFC 7/8] kmsg: add ioctl for adding and deleting kmsg* devices Marcin Niesluchowski
2015-07-03 10:49 ` [RFC 8/8] kmsg: add ioctl for kmsg* devices operating on buffers Marcin Niesluchowski
2015-07-03 10:49 ` [RFC 3/8] kmsg: introduce additional kmsg devices support Marcin Niesluchowski
2015-07-08 11:10 ` Petr Mladek
2015-07-03 10:49 ` [RFC 4/8] kmsg: add function for adding and deleting additional buffers Marcin Niesluchowski
2015-07-03 10:49 ` [RFC 5/8] kmsg: device support in mem class Marcin Niesluchowski
[not found] ` <1435920595-30879-6-git-send-email-m.niesluchow-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-07-03 15:39 ` Greg Kroah-Hartman
2015-07-03 10:49 ` [RFC 6/8] kmsg: add predefined _PID, _TID, _COMM keywords to kmsg* log dict Marcin Niesluchowski
2015-07-03 11:21 ` [RFC 0/8] Additional kmsg devices Richard Weinberger
[not found] ` <CAFLxGvxvaePEyCpLrB1cjNn4bvnCwt-_HE3zcT-6diMYNOraBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-03 15:09 ` Marcin Niesluchowski [this message]
[not found] ` <5596A58F.7090208-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-07-03 16:57 ` Andy Lutomirski
2015-07-07 13:11 ` Petr Mladek
2015-07-07 17:10 ` Karol Lewandowski
2015-07-08 10:45 ` Petr Mladek
[not found] ` <5596A80D.5040109@nod.at>
2015-07-08 8:30 ` Marcin Niesluchowski
[not found] ` <559CE110.70503@nod.at>
2015-07-08 11:17 ` Bartlomiej Zolnierkiewicz
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=5596A58F.7090208@samsung.com \
--to=m.niesluchow-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kay-tD+1rO4QERM@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pmladek-AlSwsSmVLrQ@public.gmane.org \
--cc=richard.weinberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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).