LWN.net Logo

The logger meets linux-kernel

The logger meets linux-kernel

Posted Jan 9, 2012 23:26 UTC (Mon) by geuder (subscriber, #62854)
In reply to: The logger meets linux-kernel by quotemstr
Parent article: The logger meets linux-kernel

> The cost of jumping to a userspace daemon is trivial.

If you want to make a $ 30-50 phone using a 500 mAh battery the definition of trivial changes.

How many instructions does a Linux context switch take these days? I know it's architecture specific and depends on dozens of environment factors, so you are wlecome to parametrize your answer :)

> If pumping messages over a unix socket is good enough for X11

Actually that's not good enough on a small phone.

Even if logging might not be the worst problem, from my experience as a system architect I know that sometimes you have to have simple & strict rules in big organizations. If the rule is that no user space daemons, then you must stick to it even if a certain daemon would not cause real harm. If there is a dozen of teams trying to get their daemon in, it's just easier to say no to everybody than yes to to 1 team and no to 11 others.
I think even the kernel community has some rules with no discussion and no exceptions...

(I don't know whether this was the reason for Android to do what they did.)



(Log in to post comments)

The logger meets linux-kernel

Posted Jan 9, 2012 23:55 UTC (Mon) by dlang (✭ supporter ✭, #313) [Link]

the cost of one event isn't what matters, what matters is the cost over time.

if something is 100x more expensive to run, but still only averages one cpu second per hour, it really doesn't matter.

device wakeups are similar, if you have hundreds per second it's a major problem, but once you get to around one per second the benefits of extending the sleep time further is of much less value (the average amount of time/power spent awake starts to become a fraction of the power spent 'asleep but able to wake up' and as a result, further reducing that fraction makes little practical difference.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds