Re: PQ_LAUNDRY: unexpected behaviour

2017-01-04 Thread Matthew Macy



  On Mon, 02 Jan 2017 06:01:50 -0800 Jonathan Anderson 
 wrote  
 > Hi all, 
 >  
 > I'm seeing some unexpected PQ_LAUNDRY behaviour on something fairly close 
 > to -CURRENT (drm-next-4.7 with an IFC on 26 Dec). Aside from the use of 
 > not-quite-CURRENT, it's also very possible that I don't understand how the 
 > laundry queue is supposed to work. Nonetheless, I thought I'd check whether 
 > there is a tunable I should change, an issue with the laundry queue itself, 
 > etc. 
 >  
 > After running X overnight (i915 can now run overnight on drm-next-4.7!), I 
 > end up with a little over half of my system memory in the laundry queue and 
 > a bunch of swap utilization. Even after closing X and shutting down lots of 
 > services, I see the following in top: 


Please try the drm-next branch now. Up until very recently, the shrinkers 
responsible for culling ttm/gem allocations were never run. I've now 
implemented the shrinker, but it's driven from vm_lowmem, so you'll probably 
still see what looks like a leak until you hit low memory conditions. The 
shrinker should probably be run from uma_timeout, but there isn't an 
eventhandler for that and I haven't looked any further.

-M






 > Mem: 977M Active, 31M Inact, 4722M Laundry, 1917M Wired, 165M Free 
 > ARC: 697M Total, 67M MFU, 278M MRU, 27K Anon, 22M Header, 331M Other 
 > Swap: 4096M Total, 2037M Used, 2059M Free, 49% Inuse 
 >  
 >   PID USERNAMETHR PRI NICE   SIZERES STATE   C   TIMEWCPU 
 > COMMAND 
 >   911 root  1  520 57788K  4308K select  1   0:00   0.00% sshd 
 >   974 root  1  200 43780K 0K wait2   0:00   0.00% 
 >  
 >  1406 jon   1  200 33520K  2748K select  0   0:04   0.00% 
 > gpg-agent 
 >  2038 jon   1  200 31280K  5452K ttyin   3   0:18   0.00% zsh 
 >  1251 jon   1  220 31280K  4500K pause   3   0:02   1.46% zsh 
 >  7102 jon   1  200 31280K  3744K ttyin   0   0:00   0.00% zsh 
 >  1898 jon   1  200 31280K  3036K ttyin   1   0:00   0.00% zsh 
 >  1627 jon   1  210 31280K 0K pause   0   0:00   0.00%  
 > 22989 jon   1  200 31152K  6020K ttyin   1   0:01   0.00% zsh 
 > 22495 jon   1  490 31152K  6016K ttyin   0   0:02   0.00% zsh 
 >  1621 jon   1  200 28196K  8816K select  2   0:40   0.00% tmux 
 >  6214 jon   1  520 27008K  2872K ttyin   1   0:00   0.00% zsh 
 >  6969 jon   1  520 27008K  2872K ttyin   3   0:00   0.00% zsh 
 >  6609 root  1  200 20688K  4604K select  1   0:00   0.00% 
 > wpa_supplicant 
 >   914 root  1  200 20664K  5232K select  2   0:02   0.00% 
 > sendmail 
 >   917 smmsp 1  200 20664K 0K pause   0   0:00   0.00% 
 >  
 > 24206 jon   1  230 20168K  3500K CPU00   0:00   0.00% top 
 >   921 root  1  200 12616K   608K nanslp  1   0:00   0.00% cron 
 > ``` 
 >  
 > Are there any things I could do (e.g., sysctls, tunables) to figure out 
 > what's happening? Can I manually force the laundry to be done? `swapoff -a` 
 > fails due to a lack of memory. 
 >  
 > Thanks, 
 >  
 >  
 > Jon 
 > --  
 > jonat...@freebsd.org 
 > ___ 
 > 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-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: 'make buildworld' failure

2017-01-04 Thread Hiroki Sato
hiren panchasara  wrote
  in <20170104180954.gv17...@strugglingcoder.info>:

hi> + hrs@
hi> On 01/04/17 at 12:43P, Oleg V. Nauman wrote:
hi> > ===> usr.sbin/inetd (all)
hi> > cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -
hi> > B/usr/obj/usr/src/tmp/usr/bin  -O2 -pipe -march=nehalem  -DLOGIN_CAP 
-DIPSEC -
hi> > g -MD  -MF.depend.inetd.o -MTinetd.o -std=gnu99 -fstack-protector-strong -
hi> > Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -
hi> > Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -
hi> > Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-
hi> > variable -Wno-tautological-compare -Wno-unused-value 
-Wno-parentheses-equality
hi> > -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef  
-Qunused-
hi> > arguments  -c /usr/src/usr.sbin/inetd/inetd.c -o inetd.o
hi> > /usr/src/usr.sbin/inetd/inetd.c:319:28: error: implicit declaration of
hi> > function 'satosin6' is
hi> >   invalid in C99 [-Werror,-Wimplicit-function-declaration]
hi> > IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
hi> >   ^
hi> > /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 
'int' is
hi> > not a pointer
hi> > IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
hi> >     ^
hi> > /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:266:4: note: expanded from
hi> > macro
hi> >   'IN6_IS_ADDR_V4MAPPED'
hi> > ((a)->__u6_addr.__u6_addr32[0] == 0 &&  \
hi> >   ^
hi> > /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 
'int' is
hi> > not a pointer
hi> > IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
hi> >     ^
hi> > /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:267:4: note: expanded from
hi> > macro
hi> >   'IN6_IS_ADDR_V4MAPPED'
hi> >  (a)->__u6_addr.__u6_addr32[1] == 0 &&  \
hi> >   ^
hi> > /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 
'int' is
hi> > not a pointer
hi> > IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
hi> >     ^
hi> > /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:268:4: note: expanded from
hi> > macro
hi> >   'IN6_IS_ADDR_V4MAPPED'
hi> >  (a)->__u6_addr.__u6_addr32[2] == ntohl(0x))
hi> >   ^
hi> > 4 errors generated.
hi> > *** Error code 1
hi> >
hi> >
hi> >
hi> > root@asus:/usr/src # svnlite info|grep Rev:
hi> > Last Changed Rev: 311250
hi> >
hi> > My current system revision is r310560
hi> >
hi> >  It possible that it is due to WITHOUT_INET6 defined in /etc/src.conf
hi>
hi> r310921 could be it.

 Thank you for the report and sorry for the breakage.  Should be fixed
 at r311354.

-- Hiroki


pgpuACXH4_4W8.pgp
Description: PGP signature


Re: How many CPU cores does FreeBSD support?

2017-01-04 Thread Eric Joyner
I started off with a snapshot of 12-CURRENT, but I got a kernel panic on
boot that complained about a duplicate local APIC ID. For now, disabling
Hyper Threading gets rid of that panic. I think there's a KASSERT that
wasn't getting hit on my 11.0-RELEASE install.

On Wed, Jan 4, 2017 at 2:00 PM Eric Joyner  wrote:

> Ok; I will try that and will report back.
>
> - Eric
>
> On Wed, Jan 4, 2017 at 11:59 AM Konstantin Belousov 
> wrote:
>
> On Wed, Jan 04, 2017 at 06:53:23PM +, Eric Joyner wrote:
> > Adding freebsd-current, because that's a good idea.
> >
> > I see these lines in the beginning of dmesg:
> >
> > MADT: Ignoring local APIC ID 256 (too high)
> >
> >
> >   [907/911]
> > MADT: Ignoring local APIC ID 260 (too high)
> >
> >
> >   [906/911]
> > MADT: Ignoring local APIC ID 264 (too high)
> >
> >
> >   [905/911]
> > MADT: Ignoring local APIC ID 268 (too high)
> >
> >
> >   [904/911]
> > MADT: Ignoring local APIC ID 272 (too high)
> >
> >
> >   [903/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> >
> >
> >   [901/911]
> > MADT: Ignoring local APIC ID 272 (too high)
> >
> >
> >   [903/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> >
> >
> >   [901/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> > MADT: Ignoring local APIC ID 284 (too high)
> > MADT: Ignoring local APIC ID 288 (too high)
> > MADT: Ignoring local APIC ID 292 (too high)
> > MADT: Ignoring local APIC ID 296 (too high)
> > MADT: Ignoring local APIC ID 300 (too high)
> > MADT: Ignoring local APIC ID 257 (too high)
> > MADT: Ignoring local APIC ID 261 (too high)
> > MADT: Ignoring local APIC ID 265 (too high)
> > MADT: Ignoring local APIC ID 269 (too high)
> > MADT: Ignoring local APIC ID 273 (too high)
> > MADT: Ignoring local APIC ID 277 (too high)
> > MADT: Ignoring local APIC ID 281 (too high)
> > MADT: Ignoring local APIC ID 285 (too high)
> > MADT: Ignoring local APIC ID 289 (too high)
> > MADT: Ignoring local APIC ID 293 (too high)
> > MADT: Ignoring local APIC ID 297 (too high)
> > MADT: Ignoring local APIC ID 301 (too high)
> > MADT: Ignoring local APIC ID 258 (too high)
> > MADT: Ignoring local APIC ID 262 (too high)
> > MADT: Ignoring local APIC ID 266 (too high)
> > MADT: Ignoring local APIC ID 270 (too high)
> > MADT: Ignoring local APIC ID 274 (too high)
> > MADT: Ignoring local APIC ID 278 (too high)
> > MADT: Ignoring local APIC ID 282 (too high)
> > MADT: Ignoring local APIC ID 286 (too high)
> > MADT: Ignoring local APIC ID 290 (too high)
> > MADT: Ignoring local APIC ID 294 (too high)
> > MADT: Ignoring local APIC ID 298 (too high)
> > MADT: Ignoring local APIC ID 302 (too high)
> > MADT: Ignoring local APIC ID 255 (too high)
> > MADT: Ignoring local APIC ID 259 (too high)
> > MADT: Ignoring local APIC ID 263 (too high)
> > MADT: Ignoring local APIC ID 267 (too high)
> > MADT: Ignoring local APIC ID 271 (too high)
> > MADT: Ignoring local APIC ID 275 (too high)
> > MADT: Ignoring local APIC ID 279 (too high)
> > MADT: Ignoring local APIC ID 283 (too high)
> > MADT: Ignoring local APIC ID 287 (too high)
> > MADT: Ignoring local APIC ID 291 (too high)
> > MADT: Ignoring local APIC ID 295 (too high)
> > MADT: Ignoring local APIC ID 299 (too high)
> > MADT: Ignoring local APIC ID 303 (too high)
> > Copyright (c) 1992-2016 The FreeBSD Project.
> > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> > The Regents of the University of California. All rights reserved.
> > FreeBSD is a registered trademark of The FreeBSD Foundation.
> > FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
> > r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
> > FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on
> LLVM
> > 3.8.0)
> > SRAT: No CPU found for memory domain 1
> > VT(efifb): resolution 800x600
> > CPU: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz (1396.80-MHz K8-class CPU)
> >   Origin="GenuineIntel"  Id=0x50671  Family=0x6  Model=0x57  Stepping=1
> >
> >
> Features=0xbfebfbff
> >
> >
> Features2=0x7ff8f39f
> >   AMD Features=0x2c100800
> >   AMD Features2=0x121
> >   Structured Extended
> >
> Features=0x1c0d23ab
> >   Structured Extended Features2=0x1
> >   XSAVE Features=0x1
> >   TSC: P-state invariant, performance statistics
> > real memory  = 223332007936 (212986 MB)
> > avail memory = 216976429056 (206924 MB)
> > Event timer "LAPIC" quality 600
> > ACPI APIC Table: 
> > FreeBSD/SMP: Multiprocessor System Detected: 223 CPUs
> > FreeBSD/SMP: Non-uniform topology
> >
> > It sounds like those MADT errors point to the problem?
>
> In sys/x86/acpica/madt.c file, function madt_add_cpu(), just remove
> the block
> if (apic_id > MAX_APIC_ID) {
> printf("MADT: Igno

Re: How many CPU cores does FreeBSD support?

2017-01-04 Thread Eric Joyner
Ok; I will try that and will report back.

- Eric

On Wed, Jan 4, 2017 at 11:59 AM Konstantin Belousov 
wrote:

> On Wed, Jan 04, 2017 at 06:53:23PM +, Eric Joyner wrote:
> > Adding freebsd-current, because that's a good idea.
> >
> > I see these lines in the beginning of dmesg:
> >
> > MADT: Ignoring local APIC ID 256 (too high)
> >
> >
> >   [907/911]
> > MADT: Ignoring local APIC ID 260 (too high)
> >
> >
> >   [906/911]
> > MADT: Ignoring local APIC ID 264 (too high)
> >
> >
> >   [905/911]
> > MADT: Ignoring local APIC ID 268 (too high)
> >
> >
> >   [904/911]
> > MADT: Ignoring local APIC ID 272 (too high)
> >
> >
> >   [903/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> >
> >
> >   [901/911]
> > MADT: Ignoring local APIC ID 272 (too high)
> >
> >
> >   [903/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> >
> >
> >   [901/911]
> > MADT: Ignoring local APIC ID 276 (too high)
> >
> >
> >   [902/911]
> > MADT: Ignoring local APIC ID 280 (too high)
> > MADT: Ignoring local APIC ID 284 (too high)
> > MADT: Ignoring local APIC ID 288 (too high)
> > MADT: Ignoring local APIC ID 292 (too high)
> > MADT: Ignoring local APIC ID 296 (too high)
> > MADT: Ignoring local APIC ID 300 (too high)
> > MADT: Ignoring local APIC ID 257 (too high)
> > MADT: Ignoring local APIC ID 261 (too high)
> > MADT: Ignoring local APIC ID 265 (too high)
> > MADT: Ignoring local APIC ID 269 (too high)
> > MADT: Ignoring local APIC ID 273 (too high)
> > MADT: Ignoring local APIC ID 277 (too high)
> > MADT: Ignoring local APIC ID 281 (too high)
> > MADT: Ignoring local APIC ID 285 (too high)
> > MADT: Ignoring local APIC ID 289 (too high)
> > MADT: Ignoring local APIC ID 293 (too high)
> > MADT: Ignoring local APIC ID 297 (too high)
> > MADT: Ignoring local APIC ID 301 (too high)
> > MADT: Ignoring local APIC ID 258 (too high)
> > MADT: Ignoring local APIC ID 262 (too high)
> > MADT: Ignoring local APIC ID 266 (too high)
> > MADT: Ignoring local APIC ID 270 (too high)
> > MADT: Ignoring local APIC ID 274 (too high)
> > MADT: Ignoring local APIC ID 278 (too high)
> > MADT: Ignoring local APIC ID 282 (too high)
> > MADT: Ignoring local APIC ID 286 (too high)
> > MADT: Ignoring local APIC ID 290 (too high)
> > MADT: Ignoring local APIC ID 294 (too high)
> > MADT: Ignoring local APIC ID 298 (too high)
> > MADT: Ignoring local APIC ID 302 (too high)
> > MADT: Ignoring local APIC ID 255 (too high)
> > MADT: Ignoring local APIC ID 259 (too high)
> > MADT: Ignoring local APIC ID 263 (too high)
> > MADT: Ignoring local APIC ID 267 (too high)
> > MADT: Ignoring local APIC ID 271 (too high)
> > MADT: Ignoring local APIC ID 275 (too high)
> > MADT: Ignoring local APIC ID 279 (too high)
> > MADT: Ignoring local APIC ID 283 (too high)
> > MADT: Ignoring local APIC ID 287 (too high)
> > MADT: Ignoring local APIC ID 291 (too high)
> > MADT: Ignoring local APIC ID 295 (too high)
> > MADT: Ignoring local APIC ID 299 (too high)
> > MADT: Ignoring local APIC ID 303 (too high)
> > Copyright (c) 1992-2016 The FreeBSD Project.
> > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> > The Regents of the University of California. All rights reserved.
> > FreeBSD is a registered trademark of The FreeBSD Foundation.
> > FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
> > r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
> > FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on
> LLVM
> > 3.8.0)
> > SRAT: No CPU found for memory domain 1
> > VT(efifb): resolution 800x600
> > CPU: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz (1396.80-MHz K8-class CPU)
> >   Origin="GenuineIntel"  Id=0x50671  Family=0x6  Model=0x57  Stepping=1
> >
> >
> Features=0xbfebfbff
> >
> >
> Features2=0x7ff8f39f
> >   AMD Features=0x2c100800
> >   AMD Features2=0x121
> >   Structured Extended
> >
> Features=0x1c0d23ab
> >   Structured Extended Features2=0x1
> >   XSAVE Features=0x1
> >   TSC: P-state invariant, performance statistics
> > real memory  = 223332007936 (212986 MB)
> > avail memory = 216976429056 (206924 MB)
> > Event timer "LAPIC" quality 600
> > ACPI APIC Table: 
> > FreeBSD/SMP: Multiprocessor System Detected: 223 CPUs
> > FreeBSD/SMP: Non-uniform topology
> >
> > It sounds like those MADT errors point to the problem?
>
> In sys/x86/acpica/madt.c file, function madt_add_cpu(), just remove
> the block
> if (apic_id > MAX_APIC_ID) {
> printf("MADT: Ignoring local APIC ID %u (too high)\n",
> apic_id);
> return;
> }
> Best to do it on HEAD and not on 11.0.
> If it helps, commit the change.
>
> Also, for >= 256 CPUs, you might need to enable interrupt remapping
> in the DMAR, use loader tunables
> hw.dmar.enable <= to enable D

Re: How many CPU cores does FreeBSD support?

2017-01-04 Thread Konstantin Belousov
On Wed, Jan 04, 2017 at 06:53:23PM +, Eric Joyner wrote:
> Adding freebsd-current, because that's a good idea.
> 
> I see these lines in the beginning of dmesg:
> 
> MADT: Ignoring local APIC ID 256 (too high)
> 
> 
>   [907/911]
> MADT: Ignoring local APIC ID 260 (too high)
> 
> 
>   [906/911]
> MADT: Ignoring local APIC ID 264 (too high)
> 
> 
>   [905/911]
> MADT: Ignoring local APIC ID 268 (too high)
> 
> 
>   [904/911]
> MADT: Ignoring local APIC ID 272 (too high)
> 
> 
>   [903/911]
> MADT: Ignoring local APIC ID 276 (too high)
> 
> 
>   [902/911]
> MADT: Ignoring local APIC ID 280 (too high)
> 
> 
>   [901/911]
> MADT: Ignoring local APIC ID 272 (too high)
> 
> 
>   [903/911]
> MADT: Ignoring local APIC ID 276 (too high)
> 
> 
>   [902/911]
> MADT: Ignoring local APIC ID 280 (too high)
> 
> 
>   [901/911]
> MADT: Ignoring local APIC ID 276 (too high)
> 
> 
>   [902/911]
> MADT: Ignoring local APIC ID 280 (too high)
> MADT: Ignoring local APIC ID 284 (too high)
> MADT: Ignoring local APIC ID 288 (too high)
> MADT: Ignoring local APIC ID 292 (too high)
> MADT: Ignoring local APIC ID 296 (too high)
> MADT: Ignoring local APIC ID 300 (too high)
> MADT: Ignoring local APIC ID 257 (too high)
> MADT: Ignoring local APIC ID 261 (too high)
> MADT: Ignoring local APIC ID 265 (too high)
> MADT: Ignoring local APIC ID 269 (too high)
> MADT: Ignoring local APIC ID 273 (too high)
> MADT: Ignoring local APIC ID 277 (too high)
> MADT: Ignoring local APIC ID 281 (too high)
> MADT: Ignoring local APIC ID 285 (too high)
> MADT: Ignoring local APIC ID 289 (too high)
> MADT: Ignoring local APIC ID 293 (too high)
> MADT: Ignoring local APIC ID 297 (too high)
> MADT: Ignoring local APIC ID 301 (too high)
> MADT: Ignoring local APIC ID 258 (too high)
> MADT: Ignoring local APIC ID 262 (too high)
> MADT: Ignoring local APIC ID 266 (too high)
> MADT: Ignoring local APIC ID 270 (too high)
> MADT: Ignoring local APIC ID 274 (too high)
> MADT: Ignoring local APIC ID 278 (too high)
> MADT: Ignoring local APIC ID 282 (too high)
> MADT: Ignoring local APIC ID 286 (too high)
> MADT: Ignoring local APIC ID 290 (too high)
> MADT: Ignoring local APIC ID 294 (too high)
> MADT: Ignoring local APIC ID 298 (too high)
> MADT: Ignoring local APIC ID 302 (too high)
> MADT: Ignoring local APIC ID 255 (too high)
> MADT: Ignoring local APIC ID 259 (too high)
> MADT: Ignoring local APIC ID 263 (too high)
> MADT: Ignoring local APIC ID 267 (too high)
> MADT: Ignoring local APIC ID 271 (too high)
> MADT: Ignoring local APIC ID 275 (too high)
> MADT: Ignoring local APIC ID 279 (too high)
> MADT: Ignoring local APIC ID 283 (too high)
> MADT: Ignoring local APIC ID 287 (too high)
> MADT: Ignoring local APIC ID 291 (too high)
> MADT: Ignoring local APIC ID 295 (too high)
> MADT: Ignoring local APIC ID 299 (too high)
> MADT: Ignoring local APIC ID 303 (too high)
> Copyright (c) 1992-2016 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> The Regents of the University of California. All rights reserved.
> FreeBSD is a registered trademark of The FreeBSD Foundation.
> FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
> r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
> FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM
> 3.8.0)
> SRAT: No CPU found for memory domain 1
> VT(efifb): resolution 800x600
> CPU: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz (1396.80-MHz K8-class CPU)
>   Origin="GenuineIntel"  Id=0x50671  Family=0x6  Model=0x57  Stepping=1
> 
> Features=0xbfebfbff
> 
> Features2=0x7ff8f39f
>   AMD Features=0x2c100800
>   AMD Features2=0x121
>   Structured Extended
> Features=0x1c0d23ab
>   Structured Extended Features2=0x1
>   XSAVE Features=0x1
>   TSC: P-state invariant, performance statistics
> real memory  = 223332007936 (212986 MB)
> avail memory = 216976429056 (206924 MB)
> Event timer "LAPIC" quality 600
> ACPI APIC Table: 
> FreeBSD/SMP: Multiprocessor System Detected: 223 CPUs
> FreeBSD/SMP: Non-uniform topology
> 
> It sounds like those MADT errors point to the problem?

In sys/x86/acpica/madt.c file, function madt_add_cpu(), just remove
the block
if (apic_id > MAX_APIC_ID) {
printf("MADT: Ignoring local APIC ID %u (too high)\n",
apic_id);
return;
}
Best to do it on HEAD and not on 11.0.
If it helps, commit the change.

Also, for >= 256 CPUs, you might need to enable interrupt remapping
in the DMAR, use loader tunables
hw.dmar.enable <= to enable DMAR
hw.dmar.ir <= to enable remapping
hw.dmar.dma <= to disable IOMMU if it interacts badly with your hw
___
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"


x2APIC support (Re: How many CPU cores does FreeBSD support?)

2017-01-04 Thread Ian FREISLICH

Hi

I think your issue relates to x2APIC support and I don't think that full 
support for parsing x2APIC MADT entries and doing interrupts remapping 
has been committed yet from my very brief search of the source and 
commit messages.  I've copied Andriy Gapon and Konstantin Belousov who 
participated in another x2APIC thread in September last year.  They will 
probably have a more intelligible response.


sys/x86/include/apicvar.h limits APIC IDs as follows:

#define MAX_APIC_ID 0xfe
#define APIC_ID_ALL 0xff

This is why CPUs with an APIC ID above 255 are being ignored in 
acpica/madt.c


sys/x86/x86/mptable.c has this choice piece of code:

if (intr->dst_apic_id == 0xff)
apic_id = APIC_ID_ALL;
else
apic_id = intr->dst_apic_id;

which for the current value of APIC_ID_ALL can simply be rewritten as:

apic_id = intr->dst_apic_id;

I do not think it is safe to increase MAX_APIC_ID yet.

Ian

--
Ian Freislich

On 01/04/17 13:53, Eric Joyner wrote:

Adding freebsd-current, because that's a good idea.

I see these lines in the beginning of dmesg:

MADT: Ignoring local APIC ID 256 (too high)


   [907/911]
MADT: Ignoring local APIC ID 260 (too high)


   [906/911]
MADT: Ignoring local APIC ID 264 (too high)


   [905/911]
MADT: Ignoring local APIC ID 268 (too high)


   [904/911]
MADT: Ignoring local APIC ID 272 (too high)


   [903/911]
MADT: Ignoring local APIC ID 276 (too high)


   [902/911]
MADT: Ignoring local APIC ID 280 (too high)


   [901/911]
MADT: Ignoring local APIC ID 272 (too high)


   [903/911]
MADT: Ignoring local APIC ID 276 (too high)


   [902/911]
MADT: Ignoring local APIC ID 280 (too high)


   [901/911]
MADT: Ignoring local APIC ID 276 (too high)


   [902/911]
MADT: Ignoring local APIC ID 280 (too high)
MADT: Ignoring local APIC ID 284 (too high)
MADT: Ignoring local APIC ID 288 (too high)
MADT: Ignoring local APIC ID 292 (too high)
MADT: Ignoring local APIC ID 296 (too high)
MADT: Ignoring local APIC ID 300 (too high)
MADT: Ignoring local APIC ID 257 (too high)
MADT: Ignoring local APIC ID 261 (too high)
MADT: Ignoring local APIC ID 265 (too high)
MADT: Ignoring local APIC ID 269 (too high)
MADT: Ignoring local APIC ID 273 (too high)
MADT: Ignoring local APIC ID 277 (too high)
MADT: Ignoring local APIC ID 281 (too high)
MADT: Ignoring local APIC ID 285 (too high)
MADT: Ignoring local APIC ID 289 (too high)
MADT: Ignoring local APIC ID 293 (too high)
MADT: Ignoring local APIC ID 297 (too high)
MADT: Ignoring local APIC ID 301 (too high)
MADT: Ignoring local APIC ID 258 (too high)
MADT: Ignoring local APIC ID 262 (too high)
MADT: Ignoring local APIC ID 266 (too high)
MADT: Ignoring local APIC ID 270 (too high)
MADT: Ignoring local APIC ID 274 (too high)
MADT: Ignoring local APIC ID 278 (too high)
MADT: Ignoring local APIC ID 282 (too high)
MADT: Ignoring local APIC ID 286 (too high)
MADT: Ignoring local APIC ID 290 (too high)
MADT: Ignoring local APIC ID 294 (too high)
MADT: Ignoring local APIC ID 298 (too high)
MADT: Ignoring local APIC ID 302 (too high)
MADT: Ignoring local APIC ID 255 (too high)
MADT: Ignoring local APIC ID 259 (too high)
MADT: Ignoring local APIC ID 263 (too high)
MADT: Ignoring local APIC ID 267 (too high)
MADT: Ignoring local APIC ID 271 (too high)
MADT: Ignoring local APIC ID 275 (too high)
MADT: Ignoring local APIC ID 279 (too high)
MADT: Ignoring local APIC ID 283 (too high)
MADT: Ignoring local APIC ID 287 (too high)
MADT: Ignoring local APIC ID 291 (too high)
MADT: Ignoring local APIC ID 295 (too high)
MADT: Ignoring local APIC ID 299 (too high)
MADT: Ignoring local APIC ID 303 (too high)
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
 r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM
3.8.0)
SRAT: No CPU found for memory domain 1
VT(efifb): resolution 800x600
CPU: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz (1396.80-MHz K8-class CPU)
   Origin="GenuineIntel"  Id=0x50671  Family=0x6  Model=0x57  Stepping=1

Features=0xbfebfbff

Features2=0x7ff8f39f
   AMD Features=0x2c100800
   AMD Features2=0x121
   Structured Extended
Features=0x1c0d23ab
   Structured Extended Features2=0x1
   XSAVE Features=0x1
   TSC: P-state invariant, performance statistics
real memory  = 223332007936 (212986 MB)
avail memory = 216976429056 (206924 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 223 CPUs
FreeBSD/SMP: Non-uniform topology

It sounds like those MADT errors point to the problem?

- Eric

On Tue, Jan 3, 2017 at 11:41 PM Shane Ambler  wrote:


On 04/01/2017 08:08, E

Re: How many CPU cores does FreeBSD support?

2017-01-04 Thread Steve O'Hara-Smith
On Wed, 04 Jan 2017 18:53:23 +
Eric Joyner  wrote:

> MADT: Ignoring local APIC ID 303 (too high)

Hmm you said this machine has 272 cores so clearly the IDs have
gaps (I have no idea why there are gaps or where these IDs are allocated
though). I expect you'll find that 223 of the cores have IDs below 256 and
the remaining 49 have IDs of 256 and above and FreeBSD is not using those
cores.

-- 
Steve O'Hara-Smith 
___
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: How many CPU cores does FreeBSD support?

2017-01-04 Thread Eric Joyner
Adding freebsd-current, because that's a good idea.

I see these lines in the beginning of dmesg:

MADT: Ignoring local APIC ID 256 (too high)


  [907/911]
MADT: Ignoring local APIC ID 260 (too high)


  [906/911]
MADT: Ignoring local APIC ID 264 (too high)


  [905/911]
MADT: Ignoring local APIC ID 268 (too high)


  [904/911]
MADT: Ignoring local APIC ID 272 (too high)


  [903/911]
MADT: Ignoring local APIC ID 276 (too high)


  [902/911]
MADT: Ignoring local APIC ID 280 (too high)


  [901/911]
MADT: Ignoring local APIC ID 272 (too high)


  [903/911]
MADT: Ignoring local APIC ID 276 (too high)


  [902/911]
MADT: Ignoring local APIC ID 280 (too high)


  [901/911]
MADT: Ignoring local APIC ID 276 (too high)


  [902/911]
MADT: Ignoring local APIC ID 280 (too high)
MADT: Ignoring local APIC ID 284 (too high)
MADT: Ignoring local APIC ID 288 (too high)
MADT: Ignoring local APIC ID 292 (too high)
MADT: Ignoring local APIC ID 296 (too high)
MADT: Ignoring local APIC ID 300 (too high)
MADT: Ignoring local APIC ID 257 (too high)
MADT: Ignoring local APIC ID 261 (too high)
MADT: Ignoring local APIC ID 265 (too high)
MADT: Ignoring local APIC ID 269 (too high)
MADT: Ignoring local APIC ID 273 (too high)
MADT: Ignoring local APIC ID 277 (too high)
MADT: Ignoring local APIC ID 281 (too high)
MADT: Ignoring local APIC ID 285 (too high)
MADT: Ignoring local APIC ID 289 (too high)
MADT: Ignoring local APIC ID 293 (too high)
MADT: Ignoring local APIC ID 297 (too high)
MADT: Ignoring local APIC ID 301 (too high)
MADT: Ignoring local APIC ID 258 (too high)
MADT: Ignoring local APIC ID 262 (too high)
MADT: Ignoring local APIC ID 266 (too high)
MADT: Ignoring local APIC ID 270 (too high)
MADT: Ignoring local APIC ID 274 (too high)
MADT: Ignoring local APIC ID 278 (too high)
MADT: Ignoring local APIC ID 282 (too high)
MADT: Ignoring local APIC ID 286 (too high)
MADT: Ignoring local APIC ID 290 (too high)
MADT: Ignoring local APIC ID 294 (too high)
MADT: Ignoring local APIC ID 298 (too high)
MADT: Ignoring local APIC ID 302 (too high)
MADT: Ignoring local APIC ID 255 (too high)
MADT: Ignoring local APIC ID 259 (too high)
MADT: Ignoring local APIC ID 263 (too high)
MADT: Ignoring local APIC ID 267 (too high)
MADT: Ignoring local APIC ID 271 (too high)
MADT: Ignoring local APIC ID 275 (too high)
MADT: Ignoring local APIC ID 279 (too high)
MADT: Ignoring local APIC ID 283 (too high)
MADT: Ignoring local APIC ID 287 (too high)
MADT: Ignoring local APIC ID 291 (too high)
MADT: Ignoring local APIC ID 295 (too high)
MADT: Ignoring local APIC ID 299 (too high)
MADT: Ignoring local APIC ID 303 (too high)
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
r...@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM
3.8.0)
SRAT: No CPU found for memory domain 1
VT(efifb): resolution 800x600
CPU: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz (1396.80-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x50671  Family=0x6  Model=0x57  Stepping=1

Features=0xbfebfbff

Features2=0x7ff8f39f
  AMD Features=0x2c100800
  AMD Features2=0x121
  Structured Extended
Features=0x1c0d23ab
  Structured Extended Features2=0x1
  XSAVE Features=0x1
  TSC: P-state invariant, performance statistics
real memory  = 223332007936 (212986 MB)
avail memory = 216976429056 (206924 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 223 CPUs
FreeBSD/SMP: Non-uniform topology

It sounds like those MADT errors point to the problem?

- Eric

On Tue, Jan 3, 2017 at 11:41 PM Shane Ambler  wrote:

> On 04/01/2017 08:08, Eric Joyner wrote:
> > I have an 11.0-RELEASE-p1 system with:
> >
> > hw.model: Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz
> >
> > It's got 68 cores, but with 4-way SMT, I think it should show up with 272
> > logical cores on FreeBSD.
> >
> > However, in both kern.sched.topology_spec and hw.ncpu, it shows there are
> > only 223 cores.
> >
> > Is the limit effectively 223 cores, even though I see some #define MAXCPU
> > 256 lines in the source?
>
> You will probably find freebsd-current a better mailing list for this.
>
> How many show in dmesg?
>
>  From https://svnweb.freebsd.org/base?view=revision&revision=270223
> Bump MAXCPU on amd64 from 64 to 256.  In practice APIC only permits 255
> CPUs (IDs 0 through 254).  Getting above that limit requires x2APIC.
>
> Also note that changing MAXCPU breaks ABI compatability so you will
> need to recompile.
> https://svnweb.freebsd.org/base?view=revision&revision=284720
>
> --
> FreeBSD - the place to B...Software Developing
>
> Shane Ambler
>
>
_

Re: 'make buildworld' failure

2017-01-04 Thread hiren panchasara
+ hrs@
On 01/04/17 at 12:43P, Oleg V. Nauman wrote:
> ===> usr.sbin/inetd (all)
> cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -
> B/usr/obj/usr/src/tmp/usr/bin  -O2 -pipe -march=nehalem  -DLOGIN_CAP -DIPSEC -
> g -MD  -MF.depend.inetd.o -MTinetd.o -std=gnu99 -fstack-protector-strong -
> Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -
> Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -
> Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-
> variable -Wno-tautological-compare -Wno-unused-value 
> -Wno-parentheses-equality 
> -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef  -Qunused-
> arguments  -c /usr/src/usr.sbin/inetd/inetd.c -o inetd.o
> /usr/src/usr.sbin/inetd/inetd.c:319:28: error: implicit declaration of 
> function 'satosin6' is
>   invalid in C99 [-Werror,-Wimplicit-function-declaration]
> IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
>   ^
> /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
> not a pointer
> IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
>     ^
> /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:266:4: note: expanded from 
> macro
>   'IN6_IS_ADDR_V4MAPPED'
> ((a)->__u6_addr.__u6_addr32[0] == 0 &&  \
>   ^
> /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
> not a pointer
> IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
>     ^
> /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:267:4: note: expanded from 
> macro
>   'IN6_IS_ADDR_V4MAPPED'
>  (a)->__u6_addr.__u6_addr32[1] == 0 &&  \
>   ^
> /usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
> not a pointer
> IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
>     ^
> /usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:268:4: note: expanded from 
> macro
>   'IN6_IS_ADDR_V4MAPPED'
>  (a)->__u6_addr.__u6_addr32[2] == ntohl(0x))
>   ^
> 4 errors generated.
> *** Error code 1
> 
> 
> 
> root@asus:/usr/src # svnlite info|grep Rev:
> Last Changed Rev: 311250
> 
> My current system revision is r310560
> 
>  It possible that it is due to WITHOUT_INET6 defined in /etc/src.conf

r310921 could be it.

Cheers,
Hiren


pgpCYo47L43EI.pgp
Description: PGP signature


'make buildworld' failure

2017-01-04 Thread Oleg V. Nauman
===> usr.sbin/inetd (all)
cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -
B/usr/obj/usr/src/tmp/usr/bin  -O2 -pipe -march=nehalem  -DLOGIN_CAP -DIPSEC -
g -MD  -MF.depend.inetd.o -MTinetd.o -std=gnu99 -fstack-protector-strong -
Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -
Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -
Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-
variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef  -Qunused-
arguments  -c /usr/src/usr.sbin/inetd/inetd.c -o inetd.o
/usr/src/usr.sbin/inetd/inetd.c:319:28: error: implicit declaration of 
function 'satosin6' is
  invalid in C99 [-Werror,-Wimplicit-function-declaration]
IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
  ^
/usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
not a pointer
IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
    ^
/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:266:4: note: expanded from 
macro
  'IN6_IS_ADDR_V4MAPPED'
((a)->__u6_addr.__u6_addr32[0] == 0 &&  \
  ^
/usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
not a pointer
IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
    ^
/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:267:4: note: expanded from 
macro
  'IN6_IS_ADDR_V4MAPPED'
 (a)->__u6_addr.__u6_addr32[1] == 0 &&  \
  ^
/usr/src/usr.sbin/inetd/inetd.c:319:42: error: member reference type 'int' is 
not a pointer
IN6_IS_ADDR_V4MAPPED(&satosin6(sa)->sin6_addr))
    ^
/usr/obj/usr/src/tmp/usr/include/netinet6/in6.h:268:4: note: expanded from 
macro
  'IN6_IS_ADDR_V4MAPPED'
 (a)->__u6_addr.__u6_addr32[2] == ntohl(0x))
  ^
4 errors generated.
*** Error code 1



root@asus:/usr/src # svnlite info|grep Rev:
Last Changed Rev: 311250

My current system revision is r310560

 It possible that it is due to WITHOUT_INET6 defined in /etc/src.conf


___
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"