[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 3/3] unzstd: make helper symbols static



Hi Jan,

On 06/05/2021 07:21, Jan Beulich wrote:
On 05.05.2021 19:35, Julien Grall wrote:


On 29/04/2021 14:26, Jan Beulich wrote:
On 29.04.2021 13:27, Julien Grall wrote:
On 21/04/2021 11:22, Jan Beulich wrote:
While for the original library's purposes these functions of course want
to be externally exposed, we don't need this, and we also don't want
this both to prevent unintended use and to keep the name space tidy.
(When functions have no callers at all, wrap them with a suitable
#ifdef.) This has the added benefit of reducing the resulting binary
size - while this is all .init code, it's still desirable to not carry
dead code.

So I understand the desire to keep the code close to Linux and removing
the dead code. However I am still not convinced that the approach taken
is actually worth the amount of memory saved.

How much memory are we talking about here?

There are no (runtime) memory savings, as is being said by the
description. There are savings on the image and symbol table sizes
(see below - .*.0/ holding files as produced without the patch
applied, while .*.1/ holding output with it in place), the image
size reduction part of which is - as also expressed by the
description - a nice side effect, but not the main motivation for
the change.

Thanks for the providing the information. I have misunderstood your
original intention.

Reading them again, I have to admit this doesn't really change my view
here. You are trading a smaller name space or prevent unintended use
(not clear what would be wrong to call them) to code
maintenability/readability.

Well, I mean mainly the usual issue of us, short of having Linux-like
section reference checking, being at risk of calling __init functions
from non-__init code.

Right, we are rely on the review to not mix the tow. In the past, I have successfully used the Linux script on Xen binary. It might be a good idea to import a cut-down version in Xen.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.