[SLOF] [PATCH] base: increase catpad buffer
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Wed Nov 29 16:16:57 AEDT 2017
Segher Boessenkool <segher at kernel.crashing.org> writes:
> On Tue, Nov 28, 2017 at 03:31:43PM +0530, Nikunj A Dadhania wrote:
>> 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?
> Do you need to at all? parse-load wants to have the $bootdev string
> as input buffer, so you can do
> : load
> save-source -1 to source-id
> $boot-dev dup #ib ! span ! to ib
> ['] parse-load catch restore-source throw ;
parse-load eats away 4bytes of the first string. Trying to figure out
No NVRAM common partition, re-initializing...
Using default console: /vdevice/vty at 71000000
List of bootdev: /pci at 800000020000000/scsi at 0/disk at 100000000000000 HALT
Trying to load: from: @800000020000000/scsi at 0/disk at 100000000000000 ...
E3405: No such device
E3407: Load failed
More information about the SLOF