Re: [PATCHv3 0/9] Mark literal strings in __init / __exit code

Ingo Molnar
2014-09-16T08:57:35Z

* Mathias Krause <minipli@googlemail.com> wrote:

> > Regardless of how it's implemented on the tooling side, my
> > point remains: this kind of optimization is done on the
> > tooling side in a natural fashion, while it's an ongoing
> > maintenance concern on the kernel side.
>
> The costs of making the required changes to the code, i.e.
> changing printk() / pr_*() to pi_*() / pe_*(), are a necessary
> pain but are a one-time cost, as Joe already said. [...]

That argument is bogus - the costs form increased complexity are
ongoing for all new code affected by such constructs, and they
are an ongoing cost for all changes to the code as well.

> > So it should be done on the tooling side, especially as the
> > benefits appear to be marginal.
>
> But still, they are measurable. [...]

So is the cost of complexity measurable: we already got rid of
__init annotation variants, and we want to keep it simple and
maintainable, not litter the code with new variants again, only
to be warned about in build time checks that few developers run.

And when it comes to weighing increased complexity against some
marginal benefit, usually the simpler approach is preferred,
especially since it could all be solved via tooling. Sure, you
have to implement the tooling support for that, and have to wait
for that to trickle through to actual build environments - but in
turn that would benefit a lot more projects than the kernel
alone. If you are impatient you could do tooling in the kernel as
well, in tools/ for example.

Thanks,

Ingo