Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Slawa Olhovchenkov
On Mon, Dec 12, 2016 at 04:20:33PM -0600, A. Wilcox wrote:

>  Try the debugging patch below, which unconditionally disables import of
>  previous buffer.  To test, you would need to boot, then frob options in
>  BIOS, reboot, again frob etc.
> >>>
> >>> still need test patch? if yes, with BIOS options?
> >> Yes, please test the patch.  I explained the procedure above.
> > 
> > sorry, i don't know 'frob'.
> > what exactly options combination I need test and what about memory test?
> > 
> 
> 
> The idea is that when rebooting, stale memory contents remain, but are
> corrupted due to interleave.
> 
> "Frob" basically means "mess with".  So apply patch, test kernel,
> reboot, change NUMA option, reboot again, see if it works, and so on.
> Basically repeat your test with the NUMA=on interleave=on, NUMA=off
> interleave=on, etc etc.

NUMA=on interleave=off booted
NUMA=on interleave=on hang

I think different combination whatever?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


FreeBSD_HEAD_i386 - Build #4365 - Fixed

2016-12-12 Thread jenkins-admin
FreeBSD_HEAD_i386 - Build #4365 - Fixed:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4365/
Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4365/changes
Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD_i386/4365/console

Change summaries:

309945 by dteske:
1 is the default descriptor for redirects without an fd prefix

309944 by dteske:
Fix invalid parameter expansion (change $@ to "$@")

Without quotes, $@ loses its special meanining (see below)

% sh -c 'echo $@' /bin/sh "   1   " "   2   "
1 2
% sh -c 'echo "$@"' /bin/sh "   1   " "   2   "
   1   2

The quotes are required to get ARGV to be unperterped

309942 by dteske:
Allow the script path to contain whitespace and special characters

309941 by dteske:
Use provided API to centralize dialog title strings

309940 by dteske:
Reorder dialog parameters based on commonality for readability

309939 by dteske:
Fix incorrect use of provided API
The result of which was incorrectly sized menu dialogs

309938 by dteske:
Use provided API (change "dialog" to "$DIALOG")

309937 by dteske:
Whitespace (dialog options separated to minimize diffs)

309936 by pfg:
ed(1): Simplify some checks.

The return type for both fread(3) and fwrite(3) cannot be negative, this
renders some checks invalid and variable 'ct' unnecessary.
Also bump 'len' to size_t to avoid signed/unsigned comparison warnings.

309935 by manu:
Use the spibus accessor when applicable.

MFC after:  3 days

309934 by dteske:
Consolidate redirects into here documents, with proper code indentation

309933 by hrs:
- Refactor listening socket list.  All of the listening sockets are
  now maintained in a single linked-list in a transport-independent manner.
- Use queue.h for linked-list structure.
- Use linked-list for AllowedPeers.
- Use getaddrinfo(8) even for Unix Domain sockets.
- Use macros to type-casting from/to struct sockaddr{,_in,_in6}.
- Define fu_* macro for union f_un to shorten the member names.
- Remove an extra #include .
- Add "static" to non-exported symbols.
- !INET support is still incomplete but will be fixed later.

There is no functional change except for some minor debug messages.

309932 by dteske:
Remove an unnecessary "return $?" at end of function

309931 by hrs:
Temporarily backout the previous commit because it was totally broken due to
unresolved merge conflicts.

Pointy hat to:  hrs

309930 by dteske:
Use ternary operator

309929 by mjg:
vfs: use vrefact in getcwd and fchdir

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread A. Wilcox
 Try the debugging patch below, which unconditionally disables import of
 previous buffer.  To test, you would need to boot, then frob options in
 BIOS, reboot, again frob etc.
>>>
>>> still need test patch? if yes, with BIOS options?
>> Yes, please test the patch.  I explained the procedure above.
> 
> sorry, i don't know 'frob'.
> what exactly options combination I need test and what about memory test?
> 


The idea is that when rebooting, stale memory contents remain, but are
corrupted due to interleave.

"Frob" basically means "mess with".  So apply patch, test kernel,
reboot, change NUMA option, reboot again, see if it works, and so on.
Basically repeat your test with the NUMA=on interleave=on, NUMA=off
interleave=on, etc etc.

hth,
--arw


-- 
A. Wilcox (awilfox)
Open-source programmer (C, C++, Python)
https://code.foxkit.us/u/awilfox/



signature.asc
Description: OpenPGP digital signature


Re: Mac OS X on bhyve

2016-12-12 Thread Sergey Manucharian
Excerpts from Matthias Gamsjager's message from Fri 09-Dec-16 10:08:
> On 9 December 2016 at 09:54, A. Wilcox  wrote:
> >
> > And VirtualBox can boot Mac OS X without any bootloader or hacking, so
> > it is much more stable, and resilient to automatic updates (which you
> > need much experience to disable on newer releases, including macOS Sierra).
> >
> Assumed you run Virtualbox on OSX.

This is not correct. I used to run it in vbox on Linux in ThinkPad T430.
Haven't tried on FreeBSD though.


Sergey

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Konstantin Belousov
On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> Booting...
> ESC[01;00H8+0x8+0xe9bdc]  
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> exit from kdb_init
> KDB: enter: Boot flags requested debugger
> [ thread pid 0 tid 0 ]
- remove any video consoles from the HEAD kernel config, i.e. sc/vt and
  vga/efi,
- do not use boot -d,
- use serial console (IPMI SOL qualifies),
- set late console to 0,
and show me the verbose dmesg of such boot with the BIOS options
which cause troubles.

> 
> > Hm, might be also show the output of the 'smap' and 'memmap' output from
> > the loader.  If any of them worked, could be useful to see the same output
> > with the NUMA option disabled as well.
> 
> NUMA disabled:
> OK smap
> SMAP type=01 base= len=00099c00 attr=01
> SMAP type=02 base=00099c00 len=6400 attr=01
> SMAP type=02 base=000e len=0002 attr=01
> SMAP type=01 base=0010 len=7906b000 attr=01
> SMAP type=02 base=7916b000 len=0093a000 attr=01
> SMAP type=04 base=79aa5000 len=00505000 attr=01
> SMAP type=02 base=79faa000 len=02056000 attr=01
> SMAP type=01 base=0001 len=001f8000 attr=01
> SMAP type=02 base=7c00 len=1400 attr=01
> SMAP type=02 base=fed1c000 len=00029000 attr=01
> SMAP type=02 base=ff00 len=0100 attr=01
> NUMA enabled:
> OK smap
> SMAP type=01 base= len=00099c00 attr=01
> SMAP type=02 base=00099c00 len=6400 attr=01
> SMAP type=02 base=000e len=0002 attr=01
> SMAP type=01 base=0010 len=7906b000 attr=01
> SMAP type=04 base=79aa1000 len=00509000 attr=01
> SMAP type=02 base=79faa000 len=02056000 attr=01
> SMAP type=01 base=0001 len=001f8000 attr=01
> SMAP type=02 base=7c00 len=1400 attr=01
> SMAP type=02 base=fed1c000 len=00029000 attr=01
> SMAP type=02 base=ff00 len=0100 attr=01
> OK memmap
> memmap not found

I.e. you use CMS in BIOS/legacy BIOS boot, right ?
Can you double-check that the smap output is indeed same for all three
cases (no-NUMA, NUMA without <4G interleave, NUMA with 4G interleave) ?

msgbuf setup is very early activity and for most practical purposes it
only depends on the physical segments layout of the machine.  So I do
expect that smap layout changes when the options are frobbed.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Konstantin Belousov
On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> 
> > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > > Booting...
> > > ESC[01;00H8+0x8+0xe9bdc]  
> > > KDB: debugger backends: ddb
> > > KDB: current backend: ddb
> > > exit from kdb_init
> > > KDB: enter: Boot flags requested debugger
> > > [ thread pid 0 tid 0 ]
> > - remove any video consoles from the HEAD kernel config, i.e. sc/vt and
> >   vga/efi,
> > - do not use boot -d,
> > - use serial console (IPMI SOL qualifies),
> > - set late console to 0,
> > and show me the verbose dmesg of such boot with the BIOS options
> > which cause troubles.
> 
> Booting...
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> SMAP type=01 base= len=00099c00
> SMAP type=02 base=00099c00 len=6400
> SMAP type=02 base=000e len=0002
> SMAP type=01 base=0010 len=7906b000
> SMAP type=02 base=7916b000 len=00936000
> SMAP type=04 base=79aa1000 len=00509000
> SMAP type=02 base=79faa000 len=02056000
> SMAP type=01 base=0001 len=001f8000
> SMAP type=02 base=7c00 len=1400
> SMAP type=02 base=fed1c000 len=00029000
> SMAP type=02 base=ff00 len=0100
> 
> This is all. No more.
When you switch between variations of the NUMA enablement options, do
you just reboot the machine or do you sometimes physically turn it off ?

Try to enable memtest, with the hw.memtest.tests=1 loader variable.
Does it change things ?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Slawa Olhovchenkov
On Mon, Dec 12, 2016 at 06:54:57PM +0200, Konstantin Belousov wrote:

> On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> > On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> > 
> > > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > > > Booting...
> > > > ESC[01;00H8+0x8+0xe9bdc]
> > > >   KDB: debugger backends: ddb
> > > > KDB: current backend: ddb
> > > > exit from kdb_init
> > > > KDB: enter: Boot flags requested debugger
> > > > [ thread pid 0 tid 0 ]
> > > - remove any video consoles from the HEAD kernel config, i.e. sc/vt and
> > >   vga/efi,
> > > - do not use boot -d,
> > > - use serial console (IPMI SOL qualifies),
> > > - set late console to 0,
> > > and show me the verbose dmesg of such boot with the BIOS options
> > > which cause troubles.
> > 
> > Booting...
> > KDB: debugger backends: ddb
> > KDB: current backend: ddb
> > SMAP type=01 base= len=00099c00
> > SMAP type=02 base=00099c00 len=6400
> > SMAP type=02 base=000e len=0002
> > SMAP type=01 base=0010 len=7906b000
> > SMAP type=02 base=7916b000 len=00936000
> > SMAP type=04 base=79aa1000 len=00509000
> > SMAP type=02 base=79faa000 len=02056000
> > SMAP type=01 base=0001 len=001f8000
> > SMAP type=02 base=7c00 len=1400
> > SMAP type=02 base=fed1c000 len=00029000
> > SMAP type=02 base=ff00 len=0100
> > 
> > This is all. No more.
> When you switch between variations of the NUMA enablement options, do
> you just reboot the machine or do you sometimes physically turn it off ?

just reboot an 'power reset' via kvm client (memory preserved, i mean)

> Try to enable memtest, with the hw.memtest.tests=1 loader variable.
> Does it change things ?

System booted, dmesg is http://zxy.spb.ru/dmesg.numa

# sysctl vm.ndomains vm.default_policy vm.phys_locality vm.phys_segs
vm.ndomains: 1
vm.default_policy: rr
sysctl: unknown oid 'vm.phys_locality'
vm.phys_segs:
SEGMENT 0:

start: 0x1
end:   0x96000
domain:0
free list: 0x80caabc0

SEGMENT 1:

start: 0x10
end:   0x20
domain:0
free list: 0x80caabc0

SEGMENT 2:

start: 0x15c1000
end:   0x15ed000
domain:0
free list: 0x80caa950

SEGMENT 3:

start: 0x15ee000
end:   0x7916b000
domain:0
free list: 0x80caa950

SEGMENT 4:

start: 0x1
end:   0x1f6d8ae000
domain:0
free list: 0x80caa6e0
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Konstantin Belousov
On Mon, Dec 12, 2016 at 08:16:34PM +0300, Slawa Olhovchenkov wrote:
> On Mon, Dec 12, 2016 at 06:54:57PM +0200, Konstantin Belousov wrote:
> 
> > On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> > > On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> > > 
> > > > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > > > > Booting...
> > > > > ESC[01;00H8+0x8+0xe9bdc]  
> > > > > KDB: debugger backends: ddb
> > > > > KDB: current backend: ddb
> > > > > exit from kdb_init
> > > > > KDB: enter: Boot flags requested debugger
> > > > > [ thread pid 0 tid 0 ]
> > > > - remove any video consoles from the HEAD kernel config, i.e. sc/vt and
> > > >   vga/efi,
> > > > - do not use boot -d,
> > > > - use serial console (IPMI SOL qualifies),
> > > > - set late console to 0,
> > > > and show me the verbose dmesg of such boot with the BIOS options
> > > > which cause troubles.
> > > 
> > > Booting...
> > > KDB: debugger backends: ddb
> > > KDB: current backend: ddb
> > > SMAP type=01 base= len=00099c00
> > > SMAP type=02 base=00099c00 len=6400
> > > SMAP type=02 base=000e len=0002
> > > SMAP type=01 base=0010 len=7906b000
> > > SMAP type=02 base=7916b000 len=00936000
> > > SMAP type=04 base=79aa1000 len=00509000
> > > SMAP type=02 base=79faa000 len=02056000
> > > SMAP type=01 base=0001 len=001f8000
> > > SMAP type=02 base=7c00 len=1400
> > > SMAP type=02 base=fed1c000 len=00029000
> > > SMAP type=02 base=ff00 len=0100
> > > 
> > > This is all. No more.
> > When you switch between variations of the NUMA enablement options, do
> > you just reboot the machine or do you sometimes physically turn it off ?
> 
> just reboot an 'power reset' via kvm client (memory preserved, i mean)
> 
> > Try to enable memtest, with the hw.memtest.tests=1 loader variable.
> > Does it change things ?
> 
> System booted, dmesg is http://zxy.spb.ru/dmesg.numa
I suspect now the reversed situation could take place, the non-interleaved
option would cause hang.

My current guess is that memory content is preserved but swizzled by
the cache line sized chunks.  So that the msgbuf header, left after the
previous boot, looks correct while the real buffer content is shuffled.

Try the debugging patch below, which unconditionally disables import of
previous buffer.  To test, you would need to boot, then frob options in
BIOS, reboot, again frob etc.

diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c
index f275aef3b4f..d45ef502204 100644
--- a/sys/kern/subr_msgbuf.c
+++ b/sys/kern/subr_msgbuf.c
@@ -85,7 +85,7 @@ msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size)
 {
u_int cksum;
 
-   if (mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
+   if (1 || mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
msgbuf_init(mbp, ptr, size);
return;
}
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Slawa Olhovchenkov
On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:

> On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > Booting...
> > ESC[01;00H8+0x8+0xe9bdc]
> >   KDB: debugger backends: ddb
> > KDB: current backend: ddb
> > exit from kdb_init
> > KDB: enter: Boot flags requested debugger
> > [ thread pid 0 tid 0 ]
> - remove any video consoles from the HEAD kernel config, i.e. sc/vt and
>   vga/efi,
> - do not use boot -d,
> - use serial console (IPMI SOL qualifies),
> - set late console to 0,
> and show me the verbose dmesg of such boot with the BIOS options
> which cause troubles.

Booting...
KDB: debugger backends: ddb
KDB: current backend: ddb
SMAP type=01 base= len=00099c00
SMAP type=02 base=00099c00 len=6400
SMAP type=02 base=000e len=0002
SMAP type=01 base=0010 len=7906b000
SMAP type=02 base=7916b000 len=00936000
SMAP type=04 base=79aa1000 len=00509000
SMAP type=02 base=79faa000 len=02056000
SMAP type=01 base=0001 len=001f8000
SMAP type=02 base=7c00 len=1400
SMAP type=02 base=fed1c000 len=00029000
SMAP type=02 base=ff00 len=0100

This is all. No more.

> > > Hm, might be also show the output of the 'smap' and 'memmap' output from
> > > the loader.  If any of them worked, could be useful to see the same output
> > > with the NUMA option disabled as well.
> > 
> > NUMA disabled:
> > OK smap
> > SMAP type=01 base= len=00099c00 attr=01
> > SMAP type=02 base=00099c00 len=6400 attr=01
> > SMAP type=02 base=000e len=0002 attr=01
> > SMAP type=01 base=0010 len=7906b000 attr=01
> > SMAP type=02 base=7916b000 len=0093a000 attr=01
> > SMAP type=04 base=79aa5000 len=00505000 attr=01
> > SMAP type=02 base=79faa000 len=02056000 attr=01
> > SMAP type=01 base=0001 len=001f8000 attr=01
> > SMAP type=02 base=7c00 len=1400 attr=01
> > SMAP type=02 base=fed1c000 len=00029000 attr=01
> > SMAP type=02 base=ff00 len=0100 attr=01
> > NUMA enabled:
> > OK smap
> > SMAP type=01 base= len=00099c00 attr=01
> > SMAP type=02 base=00099c00 len=6400 attr=01
> > SMAP type=02 base=000e len=0002 attr=01
> > SMAP type=01 base=0010 len=7906b000 attr=01
> > SMAP type=04 base=79aa1000 len=00509000 attr=01
> > SMAP type=02 base=79faa000 len=02056000 attr=01
> > SMAP type=01 base=0001 len=001f8000 attr=01
> > SMAP type=02 base=7c00 len=1400 attr=01
> > SMAP type=02 base=fed1c000 len=00029000 attr=01
> > SMAP type=02 base=ff00 len=0100 attr=01
> > OK memmap
> > memmap not found
> 
> I.e. you use CMS in BIOS/legacy BIOS boot, right ?

legacy BIOS boot, yes

> Can you double-check that the smap output is indeed same for all three
> cases (no-NUMA, NUMA without <4G interleave, NUMA with 4G interleave) ?

NUMA=ON  4G interleave=ON
SMAP type=01 base= len=00099c00 attr=01 
SMAP type=02 base=00099c00 len=6400 attr=01 
SMAP type=02 base=000e len=0002 attr=01 
SMAP type=01 base=0010 len=7906b000 attr=01 
SMAP type=02 base=7916b000 len=00936000 attr=01 
SMAP type=04 base=79aa1000 len=00509000 attr=01 
SMAP type=02 base=79faa000 len=02056000 attr=01 
SMAP type=01 base=0001 len=001f8000 attr=01 
SMAP type=02 base=7c00 len=1400 attr=01 
SMAP type=02 base=fed1c000 len=00029000 attr=01 
SMAP type=02 base=ff00 len=0100 attr=01 

NUMA=ON  4G interleave=OFF
SMAP type=01 base= len=00099c00 attr=01 
SMAP type=02 base=00099c00 len=6400 attr=01 
SMAP type=02 base=000e len=0002 attr=01 
SMAP type=01 base=0010 len=7906b000 attr=01 
SMAP type=02 base=7916b000 len=00936000 attr=01 
SMAP type=04 base=79aa1000 len=00509000 attr=01 
SMAP type=02 base=79faa000 len=02056000 attr=01 
SMAP type=01 base=0001 len=001f8000 attr=01 
SMAP type=02 base=7c00 len=1400 

Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Slawa Olhovchenkov
On Mon, Dec 12, 2016 at 08:36:47PM +0200, Konstantin Belousov wrote:

> On Mon, Dec 12, 2016 at 08:43:11PM +0300, Slawa Olhovchenkov wrote:
> > On Mon, Dec 12, 2016 at 07:24:18PM +0200, Konstantin Belousov wrote:
> > 
> > > On Mon, Dec 12, 2016 at 08:16:34PM +0300, Slawa Olhovchenkov wrote:
> > > > On Mon, Dec 12, 2016 at 06:54:57PM +0200, Konstantin Belousov wrote:
> > > > 
> > > > > On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> > > > > > On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> > > > > > 
> > > > > > > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov 
> > > > > > > wrote:
> > > > > > > > Booting...
> > > > > > > > ESC[01;00H8+0x8+0xe9bdc]
> > > > > > > >   KDB: debugger backends: ddb
> > > > > > > > KDB: current backend: ddb
> > > > > > > > exit from kdb_init
> > > > > > > > KDB: enter: Boot flags requested debugger
> > > > > > > > [ thread pid 0 tid 0 ]
> > > > > > > - remove any video consoles from the HEAD kernel config, i.e. 
> > > > > > > sc/vt and
> > > > > > >   vga/efi,
> > > > > > > - do not use boot -d,
> > > > > > > - use serial console (IPMI SOL qualifies),
> > > > > > > - set late console to 0,
> > > > > > > and show me the verbose dmesg of such boot with the BIOS options
> > > > > > > which cause troubles.
> > > > > > 
> > > > > > Booting...
> > > > > > KDB: debugger backends: ddb
> > > > > > KDB: current backend: ddb
> > > > > > SMAP type=01 base= len=00099c00
> > > > > > SMAP type=02 base=00099c00 len=6400
> > > > > > SMAP type=02 base=000e len=0002
> > > > > > SMAP type=01 base=0010 len=7906b000
> > > > > > SMAP type=02 base=7916b000 len=00936000
> > > > > > SMAP type=04 base=79aa1000 len=00509000
> > > > > > SMAP type=02 base=79faa000 len=02056000
> > > > > > SMAP type=01 base=0001 len=001f8000
> > > > > > SMAP type=02 base=7c00 len=1400
> > > > > > SMAP type=02 base=fed1c000 len=00029000
> > > > > > SMAP type=02 base=ff00 len=0100
> > > > > > 
> > > > > > This is all. No more.
> > > > > When you switch between variations of the NUMA enablement options, do
> > > > > you just reboot the machine or do you sometimes physically turn it 
> > > > > off ?
> > > > 
> > > > just reboot an 'power reset' via kvm client (memory preserved, i mean)
> > > > 
> > > > > Try to enable memtest, with the hw.memtest.tests=1 loader variable.
> > > > > Does it change things ?
> > > > 
> > > > System booted, dmesg is http://zxy.spb.ru/dmesg.numa
> > > I suspect now the reversed situation could take place, the non-interleaved
> > > option would cause hang.
> > 
> > No, also booted, dmesg http://zxy.spb.ru/dmesg.numa-ninter
> I mean, it could hang if memory testing is not enabled.

realy? system boot w/o memory testing when NUMA ON and interleave OFF:
I am already report about boot after off interleave.

> > 
> > > My current guess is that memory content is preserved but swizzled by
> > > the cache line sized chunks.  So that the msgbuf header, left after the
> > > previous boot, looks correct while the real buffer content is shuffled.
> > > 
> > > Try the debugging patch below, which unconditionally disables import of
> > > previous buffer.  To test, you would need to boot, then frob options in
> > > BIOS, reboot, again frob etc.
> > 
> > still need test patch? if yes, with BIOS options?
> Yes, please test the patch.  I explained the procedure above.

sorry, i don't know 'frob'.
what exactly options combination I need test and what about memory test?

> > 
> > > diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c
> > > index f275aef3b4f..d45ef502204 100644
> > > --- a/sys/kern/subr_msgbuf.c
> > > +++ b/sys/kern/subr_msgbuf.c
> > > @@ -85,7 +85,7 @@ msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size)
> > >  {
> > >   u_int cksum;
> > >  
> > > - if (mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
> > > + if (1 || mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
> > >   msgbuf_init(mbp, ptr, size);
> > >   return;
> > >   }
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Konstantin Belousov
On Mon, Dec 12, 2016 at 08:43:11PM +0300, Slawa Olhovchenkov wrote:
> On Mon, Dec 12, 2016 at 07:24:18PM +0200, Konstantin Belousov wrote:
> 
> > On Mon, Dec 12, 2016 at 08:16:34PM +0300, Slawa Olhovchenkov wrote:
> > > On Mon, Dec 12, 2016 at 06:54:57PM +0200, Konstantin Belousov wrote:
> > > 
> > > > On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> > > > > On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> > > > > 
> > > > > > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > > > > > > Booting...
> > > > > > > ESC[01;00H8+0x8+0xe9bdc]  
> > > > > > > KDB: debugger backends: ddb
> > > > > > > KDB: current backend: ddb
> > > > > > > exit from kdb_init
> > > > > > > KDB: enter: Boot flags requested debugger
> > > > > > > [ thread pid 0 tid 0 ]
> > > > > > - remove any video consoles from the HEAD kernel config, i.e. sc/vt 
> > > > > > and
> > > > > >   vga/efi,
> > > > > > - do not use boot -d,
> > > > > > - use serial console (IPMI SOL qualifies),
> > > > > > - set late console to 0,
> > > > > > and show me the verbose dmesg of such boot with the BIOS options
> > > > > > which cause troubles.
> > > > > 
> > > > > Booting...
> > > > > KDB: debugger backends: ddb
> > > > > KDB: current backend: ddb
> > > > > SMAP type=01 base= len=00099c00
> > > > > SMAP type=02 base=00099c00 len=6400
> > > > > SMAP type=02 base=000e len=0002
> > > > > SMAP type=01 base=0010 len=7906b000
> > > > > SMAP type=02 base=7916b000 len=00936000
> > > > > SMAP type=04 base=79aa1000 len=00509000
> > > > > SMAP type=02 base=79faa000 len=02056000
> > > > > SMAP type=01 base=0001 len=001f8000
> > > > > SMAP type=02 base=7c00 len=1400
> > > > > SMAP type=02 base=fed1c000 len=00029000
> > > > > SMAP type=02 base=ff00 len=0100
> > > > > 
> > > > > This is all. No more.
> > > > When you switch between variations of the NUMA enablement options, do
> > > > you just reboot the machine or do you sometimes physically turn it off ?
> > > 
> > > just reboot an 'power reset' via kvm client (memory preserved, i mean)
> > > 
> > > > Try to enable memtest, with the hw.memtest.tests=1 loader variable.
> > > > Does it change things ?
> > > 
> > > System booted, dmesg is http://zxy.spb.ru/dmesg.numa
> > I suspect now the reversed situation could take place, the non-interleaved
> > option would cause hang.
> 
> No, also booted, dmesg http://zxy.spb.ru/dmesg.numa-ninter
I mean, it could hang if memory testing is not enabled.

> 
> > My current guess is that memory content is preserved but swizzled by
> > the cache line sized chunks.  So that the msgbuf header, left after the
> > previous boot, looks correct while the real buffer content is shuffled.
> > 
> > Try the debugging patch below, which unconditionally disables import of
> > previous buffer.  To test, you would need to boot, then frob options in
> > BIOS, reboot, again frob etc.
> 
> still need test patch? if yes, with BIOS options?
Yes, please test the patch.  I explained the procedure above.

> 
> > diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c
> > index f275aef3b4f..d45ef502204 100644
> > --- a/sys/kern/subr_msgbuf.c
> > +++ b/sys/kern/subr_msgbuf.c
> > @@ -85,7 +85,7 @@ msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size)
> >  {
> > u_int cksum;
> >  
> > -   if (mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
> > +   if (1 || mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
> > msgbuf_init(mbp, ptr, size);
> > return;
> > }
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Enabling NUMA in BIOS stop booting FreeBSD

2016-12-12 Thread Slawa Olhovchenkov
On Mon, Dec 12, 2016 at 07:24:18PM +0200, Konstantin Belousov wrote:

> On Mon, Dec 12, 2016 at 08:16:34PM +0300, Slawa Olhovchenkov wrote:
> > On Mon, Dec 12, 2016 at 06:54:57PM +0200, Konstantin Belousov wrote:
> > 
> > > On Mon, Dec 12, 2016 at 07:21:53PM +0300, Slawa Olhovchenkov wrote:
> > > > On Mon, Dec 12, 2016 at 04:54:18PM +0200, Konstantin Belousov wrote:
> > > > 
> > > > > On Sun, Dec 11, 2016 at 11:47:09PM +0300, Slawa Olhovchenkov wrote:
> > > > > > Booting...
> > > > > > ESC[01;00H8+0x8+0xe9bdc]
> > > > > >   KDB: debugger backends: ddb
> > > > > > KDB: current backend: ddb
> > > > > > exit from kdb_init
> > > > > > KDB: enter: Boot flags requested debugger
> > > > > > [ thread pid 0 tid 0 ]
> > > > > - remove any video consoles from the HEAD kernel config, i.e. sc/vt 
> > > > > and
> > > > >   vga/efi,
> > > > > - do not use boot -d,
> > > > > - use serial console (IPMI SOL qualifies),
> > > > > - set late console to 0,
> > > > > and show me the verbose dmesg of such boot with the BIOS options
> > > > > which cause troubles.
> > > > 
> > > > Booting...
> > > > KDB: debugger backends: ddb
> > > > KDB: current backend: ddb
> > > > SMAP type=01 base= len=00099c00
> > > > SMAP type=02 base=00099c00 len=6400
> > > > SMAP type=02 base=000e len=0002
> > > > SMAP type=01 base=0010 len=7906b000
> > > > SMAP type=02 base=7916b000 len=00936000
> > > > SMAP type=04 base=79aa1000 len=00509000
> > > > SMAP type=02 base=79faa000 len=02056000
> > > > SMAP type=01 base=0001 len=001f8000
> > > > SMAP type=02 base=7c00 len=1400
> > > > SMAP type=02 base=fed1c000 len=00029000
> > > > SMAP type=02 base=ff00 len=0100
> > > > 
> > > > This is all. No more.
> > > When you switch between variations of the NUMA enablement options, do
> > > you just reboot the machine or do you sometimes physically turn it off ?
> > 
> > just reboot an 'power reset' via kvm client (memory preserved, i mean)
> > 
> > > Try to enable memtest, with the hw.memtest.tests=1 loader variable.
> > > Does it change things ?
> > 
> > System booted, dmesg is http://zxy.spb.ru/dmesg.numa
> I suspect now the reversed situation could take place, the non-interleaved
> option would cause hang.

No, also booted, dmesg http://zxy.spb.ru/dmesg.numa-ninter

> My current guess is that memory content is preserved but swizzled by
> the cache line sized chunks.  So that the msgbuf header, left after the
> previous boot, looks correct while the real buffer content is shuffled.
> 
> Try the debugging patch below, which unconditionally disables import of
> previous buffer.  To test, you would need to boot, then frob options in
> BIOS, reboot, again frob etc.

still need test patch? if yes, with BIOS options?

> diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c
> index f275aef3b4f..d45ef502204 100644
> --- a/sys/kern/subr_msgbuf.c
> +++ b/sys/kern/subr_msgbuf.c
> @@ -85,7 +85,7 @@ msgbuf_reinit(struct msgbuf *mbp, void *ptr, int size)
>  {
>   u_int cksum;
>  
> - if (mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
> + if (1 || mbp->msg_magic != MSG_MAGIC || mbp->msg_size != size) {
>   msgbuf_init(mbp, ptr, size);
>   return;
>   }
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"