[SLOF] [PATCH v3] boot: do not use catpad to concatenate strings

Segher Boessenkool segher at kernel.crashing.org
Mon Dec 11 23:26:59 AEDT 2017


On Mon, Dec 11, 2017 at 12:00:25PM +0530, Nikunj A Dadhania wrote:
> Alexey Kardashevskiy <aik at ozlabs.ru> writes:
> > 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.

No, I said you do not concatenate much, on purpose.  This is to avoid
quadratic time.  Since the way the code used $cat is bad, it doesn't
matter if the buffer was too small for it; it is big enough for all
legitimate users.

I don't know if your patch achieves proper scaling.


More information about the SLOF mailing list