Re: Kernel size beyond 16 MB on amd64

2018-04-17 Thread Franco Fichtner
Hi Stuart et al.,

Sorry for the delay.  Meanwhile, I've been reproducing the
issue on 6.3 by adding device rd and increasing MINIROOTSIZE
to grow the non-gdb amd64 kernel beyond 16 MB.  The kernel
simply fails to boot.

> If the kernel should grow to a point where we run past some limit, we'll fix
> it. Right now, bsd.gdb kernels are > 50MB and load fine.

While it's all true that there are no problems with bsd.gdb,
the fact of the matter is also that even if such a bloated
kernel as mentioned in the first paragraph is stripped below
the 16 MB point it fails to boot.  It even fails to boot if
it is compressed down to a few MB, which means it has nothing
to do with the actual size, but rather how its internal objects
are addressed.

The kicker is that during a 5.8 -> 5.9 transition i386 stopped
behaving as bad as amd64 in this regard so that there is a i386
kernel that performs better than amd64 one is hardly growing as
fast as the other.

To make a long story short, the answer actually was in the
commit mentioned in the original message[1] as NKL2_KIMG_ENTRIES
is the limiting factor here killing kernel boot when embedded
total object size grows beyond a certain 16 MB point.  Changing
this to e.g. 32 allows kernels to boot as long as they in turn
are not too big to hit the next barrier.

> That commit was only to move the kernel phys load address to 16MB.

That's not true, Mike, and I assume you already knew it.  ;)

Feel free to ignore this or take it as a friendly reminder that
not everything is "write smaller code" or "[kernels] load fine".


Cheers,
Franco

[1] https://github.com/openbsd/src/commit/453010f2034



Re: Kernel size beyond 16 MB on amd64

2018-03-13 Thread Stuart Henderson
On 2018/03/12 17:50, Franco Fichtner wrote:
> Hi,
> 
> With regard to a commit[1] by Theo in 2013, several questions
> in the years before and a partial lift of the limitation on
> i386 a while back (2015?) I'd like to ask what the future plans
> are for OpenBSD.
> 
> Peeking at NetBSD, where the amd64 was bootstrapped, they are at
> 48 MB kernel size at the moment.
> 
> Will a future OpenBSD release increase it?
> 
> What can we do to help?
> 
> 
> Cheers,
> Franco
> 
> --
> [1] https://github.com/openbsd/src/commit/453010f2034
> 

I guess you'd be looking at this for ramdisks, if so, see the vnconfig
method used by flashrd instead.

https://github.com/yellowman/flashrd



Re: Kernel size beyond 16 MB on amd64

2018-03-13 Thread Mike Larkin
On Tue, Mar 13, 2018 at 04:15:23PM +0100, Franco Fichtner wrote:
> 
> > On 13. Mar 2018, at 4:04 PM, Ted Unangst  wrote:
> > 
> > Franco Fichtner wrote:
> >> What can we do to help?
> > 
> > Write smaller code...
> 
> Fair enough.  ;)
> 
> On a more serious note, I'm referring to:
> 
> https://marc.info/?l=openbsd-tech&m=112152576800634&w=2
> 
> "Immediate reboots" is what can still be reproduced
> much under the size that bsd.gdb may offer.
> 
> i386 copes better with this since 2015.  It's odd, so
> I thought I'd ask.
> 
> 
> Cheers,
> Franco
> 

I don't know what you're asking. The thread you linked to is more than 12 years
old and concerns OpenBSD 3.7.

-ml



Re: Kernel size beyond 16 MB on amd64

2018-03-13 Thread Franco Fichtner

> On 13. Mar 2018, at 4:04 PM, Ted Unangst  wrote:
> 
> Franco Fichtner wrote:
>> What can we do to help?
> 
> Write smaller code...

Fair enough.  ;)

On a more serious note, I'm referring to:

https://marc.info/?l=openbsd-tech&m=112152576800634&w=2

"Immediate reboots" is what can still be reproduced
much under the size that bsd.gdb may offer.

i386 copes better with this since 2015.  It's odd, so
I thought I'd ask.


Cheers,
Franco



Re: Kernel size beyond 16 MB on amd64

2018-03-13 Thread Ted Unangst
Franco Fichtner wrote:
> What can we do to help?

Write smaller code...



Re: Kernel size beyond 16 MB on amd64

2018-03-12 Thread Mike Larkin
On Mon, Mar 12, 2018 at 05:50:42PM +0100, Franco Fichtner wrote:
> Hi,
> 
> With regard to a commit[1] by Theo in 2013, several questions
> in the years before and a partial lift of the limitation on
> i386 a while back (2015?) I'd like to ask what the future plans
> are for OpenBSD.
> 
> Peeking at NetBSD, where the amd64 was bootstrapped, they are at
> 48 MB kernel size at the moment.
> 
> Will a future OpenBSD release increase it?
> 
> What can we do to help?
> 
> 
> Cheers,
> Franco
> 
> --
> [1] https://github.com/openbsd/src/commit/453010f2034
> 

That commit was only to move the kernel phys load address to 16MB.

If the kernel should grow to a point where we run past some limit, we'll fix
it. Right now, bsd.gdb kernels are > 50MB and load fine.

-ml



Kernel size beyond 16 MB on amd64

2018-03-12 Thread Franco Fichtner
Hi,

With regard to a commit[1] by Theo in 2013, several questions
in the years before and a partial lift of the limitation on
i386 a while back (2015?) I'd like to ask what the future plans
are for OpenBSD.

Peeking at NetBSD, where the amd64 was bootstrapped, they are at
48 MB kernel size at the moment.

Will a future OpenBSD release increase it?

What can we do to help?


Cheers,
Franco

--
[1] https://github.com/openbsd/src/commit/453010f2034