[SLOF] [PATCH v3] boot: do not use catpad to concatenate strings
Nikunj A Dadhania
nikunj at linux.vnet.ibm.com
Mon Dec 11 17:30:25 AEDT 2017
Hi Alexey,
Alexey Kardashevskiy <aik at ozlabs.ru> writes:
> On 08/12/17 16:32, Nikunj A Dadhania wrote:
>> The catpad size is 1K size, which can be hit easily hit with around 20 devices
>> with bootindex.
>>
>> Open code EVALUATE such that concatenation is not required. Replace usage of
>> $cat with a dynamically allocated buffer(16K) here.
>>
>> Reported here: https://github.com/qemu/SLOF/issues/3
>>
>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>
> I've read the v1..v3 of this patch and (to my embarrassment) I do not
> understand how this works at all :)
>
> Above you said "concatenation is not required" but there is
> bootdev-string-cat, how is that not concat? We did cat to bootdevice, now -
> to bootdev-string-cat, but this is not just it?
Earlier the concatenation was done using a common buffer $catpad
slof/fs/base.fs:CREATE $catpad 400 allot
Which had a limitation of 1K, my first patch was to increase the size of
$catpad and Segher said that $catpad was kept small on purpose for
concatenating quickly without much overhead.
Version-2 patch did following things:
1) introduced a similar static buffer for bootdev concatenation without
using $cat.
2) Replaced concatenation in LOAD and LOAD-NEXT by open coding EVALUATE word.
Version-3 made the static buffer allocate from heap instead of a static
buffer.
> For example:
>
> 0 > $bootdev type /pci at 800000020000000/ethernet at 1
> /pci at 800000020000000/ethernet at 2 disk cdrom net net1 ok
HTH
Regards
Nikunj
More information about the SLOF
mailing list