lkml.org 
[lkml]   [2015]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHSET] printk, netconsole: implement reliable netconsole
From
Date
Tejun Heo wrote:
> > If we can assume that scheduler is working, adding a kernel thread that
> > does
> >
> > while (1) {
> > read messages with metadata from /dev/kmsg
> > send them using UDP network
> > }
> >
> > might be easier than modifying netconsole module.
>
> But, I mean, if we are gonna do that in kernel, we better do it
> properly where it belongs. What's up with "easier than modifying
> netconsole module"? Why is netconsole special? And how would the
> above be any less complex than a single timer function? What am I
> missing?

User space daemon is sometimes disturbed unexpectedly due to

(a) SIGKILL by OOM-killer
(b) spurious ptrace() by somebody
(c) spurious signals such as SIGSTOP / SIGINT
(d) stalls triggered by page faults under OOM condition
(e) other problems such as scheduler being not working

We have built-in protection for (a) named /proc/$pid/oom_score_adj , but
we need to configure access control modules for protecting (b) and (c),
and we don't have protection for (d). Thinking from OOM stall discussion,
(d) is fatal when trying to obtain kernel messages under problematic
condition. I thought that a kernel thread that does

while (1) {
read messages with metadata from /dev/kmsg
send them using UDP network
}

is automatically protected from (a), (b), (c) and (d), and it could be
implemented outside of netconsole module.


\
 
 \ /
  Last update: 2015-04-18 15:21    [W:0.078 / U:2.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site