[SLOF] [PATCH] base: increase catpad buffer

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Tue Nov 28 21:01:43 AEDT 2017


Segher Boessenkool <segher at kernel.crashing.org> writes:

> On Tue, Nov 28, 2017 at 01:08:09PM +0530, Nikunj A Dadhania wrote:
>> Current buffer of 1K is not sufficient, and causes exception if more than 20
>> devices are used with bootindex. Increase the buffer size to 16K
>
> Concatenating many strings this way is quadratic in the total length,
> which is very painful with 1k already but ridiculously slow with 16k.
> Use a better method?  $cat is a nice simple lazy utility word, it is
> not good for constructing unbounded lists.

: load
[...]
   set-boot-args s" parse-load " $bootdev $cat strdup evaluate
;

Thats where we are hitting the limit. Maybe we can allocate and copy
both these strings without using the catpad?

Regards
Nikunj



More information about the SLOF mailing list