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

Re: [Xen-devel] [PATCH v1 1/4] xen: add hypercall for getting parameters at runtime



>>> On 19.03.19 at 09:12, <jgross@xxxxxxxx> wrote:
> On 19/03/2019 09:04, Jan Beulich wrote:
>>>>> On 19.03.19 at 07:07, <jgross@xxxxxxxx> wrote:
>>> Why don't we replace the "*get_func()" with a "char *current_val" being
>>> filled at parameter setting time? How current_val is allocated (static
>>> string or dynamic buffer) just has to be known by the custom parameter
>>> parsing function.
>> 
>> Could accumulate (over time) to quite a bit of wasted allocations if
>> no-one ever cares about calling the new sysctl.
> 
> In the normal case the needed memory shouldn't be more than that of the
> boot parameters, maybe plus some bytes in case runtime parameters are
> set. So I believe we are talking about less than one memory page.

Total space needed may (for now) indeed not be very much, but
setting this up would still be useless if the sysctl was never
invoked, and prone to be forgotten to update when other parts
of that command line option's handling get updated. I think
there's less risk of returning stale data if the string gets re-
constructed on demand.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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