Re: RFC: A reduced Linux network stack for small systems

From: Pavel Machek
Date: Fri May 09 2014 - 03:39:27 EST


> >> that is likely working only for the given very limited set of applications.
> >> Kernel function profiling can potentially achieve the same thing.
> >> Profile the kernel with the set of apps and then prune all cold
> >> functions out of kernel.
> >
> > Right, and are Profile-Guided-Optimization results now reproduceable?
> > Better change it to Trace-Guided-Optimization. But yeah, for a
>
> not quite. I'm saying: no extra optimizations, no GCC changes.
> Compile kernel as-is. Most functions have a stub for mcount() already.
> Use it to track whether kernel function was called or not.
> Collect this data in userspace (as perf already does), add few
> more functions that had 'notrace' attribute on them, and feed this into
> special linker that unpacks existing vmlinux, throws away cold functions,
> relocates the rest and here you have tiny vmlinux without recompilation.

It sounds like unstripped kernel will not even fit on the target machine.
If it+application would fit there, you'd have no reason to strip it down...

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/