diff --git a/test/dump/config b/test/dump/config old mode 100755 new mode 100644 diff --git a/test/dump/go_linux_dump_test.sh b/test/dump/go_linux_dump_test.sh old mode 100755 new mode 100644 diff --git a/test/dump/go_mck_dump_test.sh b/test/dump/go_mck_dump_test.sh old mode 100755 new mode 100644 diff --git a/test/dump/go_mck_dump_test_ofp.sh b/test/dump/go_mck_dump_test_ofp.sh old mode 100755 new mode 100644 diff --git a/test/dump/linux_dump_panic.sh b/test/dump/linux_dump_panic.sh old mode 100755 new mode 100644 diff --git a/test/dump/linux_dump_test.sh b/test/dump/linux_dump_test.sh old mode 100755 new mode 100644 diff --git a/test/dump/mck_dump_test.sh b/test/dump/mck_dump_test.sh old mode 100755 new mode 100644 diff --git a/test/dump/utils/extract_mckdump.sh b/test/dump/utils/extract_mckdump.sh old mode 100755 new mode 100644 diff --git a/test/dump/utils/gen_mem_chunks.sh b/test/dump/utils/gen_mem_chunks.sh old mode 100755 new mode 100644 diff --git a/test/dump/utils/kill_mcexec.sh b/test/dump/utils/kill_mcexec.sh old mode 100755 new mode 100644 diff --git a/test/dump/utils/linux_dump_cronjob.sh b/test/dump/utils/linux_dump_cronjob.sh old mode 100755 new mode 100644 diff --git a/test/dump/utils/show_mckdump.sh b/test/dump/utils/show_mckdump.sh old mode 100755 new mode 100644 diff --git a/test/mbind/mbind_test.sh b/test/mbind/mbind_test.sh index 03b53dbf..1e193210 100755 --- a/test/mbind/mbind_test.sh +++ b/test/mbind/mbind_test.sh @@ -42,6 +42,6 @@ if [ $? == 0 ]; then sudo ${MCK_DIR}/sbin/ihkosctl ${OS_IDX} kmsg exit 0 else - echo "Error: faild to mcexec" + echo "Error: failed to mcexec" exit 1 fi diff --git a/test/mbind/result/0001_mbind.log b/test/mbind/result/0001_mbind.log new file mode 100644 index 00000000..cb0399af --- /dev/null +++ b/test/mbind/result/0001_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808506f9a20): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808506f96c0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808506f9000): free failed. -32 + diff --git a/test/mbind/result/0002_mbind.log b/test/mbind/result/0002_mbind.log new file mode 100644 index 00000000..a7b9a2b5 --- /dev/null +++ b/test/mbind/result/0002_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808505b28a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808505b2ae0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808505b2660): free failed. -32 + diff --git a/test/mbind/result/0003_mbind.log b/test/mbind/result/0003_mbind.log new file mode 100644 index 00000000..2c9af7a9 --- /dev/null +++ b/test/mbind/result/0003_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d25a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d2c60): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d29c0): free failed. -32 + diff --git a/test/mbind/result/0004_mbind.log b/test/mbind/result/0004_mbind.log new file mode 100644 index 00000000..1077fd1f --- /dev/null +++ b/test/mbind/result/0004_mbind.log @@ -0,0 +1,57 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22196224, pages: 5419 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff88010129d000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43b000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[802]: default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[805]: addr-policy not found or default addr-policy found, addr(0xffff8801012a0000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808505ead20): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808505ea480): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808505ea4e0): free failed. -32 + diff --git a/test/mbind/result/0005_mbind.log b/test/mbind/result/0005_mbind.log new file mode 100644 index 00000000..699b4fe4 --- /dev/null +++ b/test/mbind/result/0005_mbind.log @@ -0,0 +1,71 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff880851c7dc60): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff880851c7dd20): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff880851c7df00): free failed. -32 + diff --git a/test/mbind/result/0006_mbind.log b/test/mbind/result/0006_mbind.log new file mode 100644 index 00000000..b98e26c9 --- /dev/null +++ b/test/mbind/result/0006_mbind.log @@ -0,0 +1,131 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab441000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab441000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab441000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab443000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab443000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab443000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab445000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab445000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab445000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab447000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab447000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab447000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab449000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab449000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab449000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44b000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44b000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab441000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab443000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab445000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab447000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab449000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff88085056a600): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff88085056acc0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff88085056a5a0): free failed. -32 + diff --git a/test/mbind/result/0007_mbind.log b/test/mbind/result/0007_mbind.log new file mode 100644 index 00000000..27c87863 --- /dev/null +++ b/test/mbind/result/0007_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff88085045c720): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff88085045c180): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff88085045c8a0): free failed. -32 + diff --git a/test/mbind/result/0008_mbind.log b/test/mbind/result/0008_mbind.log new file mode 100644 index 00000000..265bb768 --- /dev/null +++ b/test/mbind/result/0008_mbind.log @@ -0,0 +1,52 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd2020 ffff880851c7dde0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff880851c7dd80): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff880851c7da80): free failed. -32 + diff --git a/test/mbind/result/0009_mbind.log b/test/mbind/result/0009_mbind.log new file mode 100644 index 00000000..568c9e01 --- /dev/null +++ b/test/mbind/result/0009_mbind.log @@ -0,0 +1,52 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808506f96c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808506f95a0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808506f9cc0): free failed. -32 + diff --git a/test/mbind/result/0010_mbind.log b/test/mbind/result/0010_mbind.log new file mode 100644 index 00000000..53686870 --- /dev/null +++ b/test/mbind/result/0010_mbind.log @@ -0,0 +1,60 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_INTERLEAVE) rst:-1 (MPOL_INTERLEAVE is not implemented yet) +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22196224, pages: 5419 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: numa_mem_policy=3 +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 2 pages +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff880101298000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff88010129d000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[803]: addr-policy not found, addr(0xffff8801012a0000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808505eade0): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808505ea6c0): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808505ea000): free failed. -32 + diff --git a/test/mbind/result/0011_mbind.log b/test/mbind/result/0011_mbind.log new file mode 100644 index 00000000..58174cfd --- /dev/null +++ b/test/mbind/result/0011_mbind.log @@ -0,0 +1,48 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22196224, pages: 5419 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808506f95a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808506f9f00): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808506f9de0): free failed. -32 + diff --git a/test/mbind/result/0012_mbind.log b/test/mbind/result/0012_mbind.log new file mode 100644 index 00000000..82eda7c2 --- /dev/null +++ b/test/mbind/result/0012_mbind.log @@ -0,0 +1,48 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x1 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808506ce5a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808506ce540): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808506ce780): free failed. -32 + diff --git a/test/mbind/result/0013_mbind.log b/test/mbind/result/0013_mbind.log new file mode 100644 index 00000000..9189d00b --- /dev/null +++ b/test/mbind/result/0013_mbind.log @@ -0,0 +1,48 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x1 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22200320, pages: 5420 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d28a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d2840): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d2cc0): free failed. -32 + diff --git a/test/mbind/result/0014_mbind.log b/test/mbind/result/0014_mbind.log new file mode 100644 index 00000000..5cbf2ae3 --- /dev/null +++ b/test/mbind/result/0014_mbind.log @@ -0,0 +1,49 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8003 0x1 1 0x8000 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22196224, pages: 5419 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808506f9a20): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808506f9de0): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808506f9600): free failed. -32 + diff --git a/test/mbind/result/0015_mbind.log b/test/mbind/result/0015_mbind.log new file mode 100644 index 00000000..4dc12450 --- /dev/null +++ b/test/mbind/result/0015_mbind.log @@ -0,0 +1,54 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808506f97e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808506f9660): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808506f9f00): free failed. -32 + diff --git a/test/mbind/result/0016_mbind.log b/test/mbind/result/0016_mbind.log new file mode 100644 index 00000000..51b61bcc --- /dev/null +++ b/test/mbind/result/0016_mbind.log @@ -0,0 +1,54 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88085045cd20): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085045c780): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085045c000): free failed. -32 + diff --git a/test/mbind/result/0017_mbind.log b/test/mbind/result/0017_mbind.log new file mode 100644 index 00000000..da855900 --- /dev/null +++ b/test/mbind/result/0017_mbind.log @@ -0,0 +1,54 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808506f9d20): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808506f9960): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808506f9780): free failed. -32 + diff --git a/test/mbind/result/0018_mbind.log b/test/mbind/result/0018_mbind.log new file mode 100644 index 00000000..7a911da4 --- /dev/null +++ b/test/mbind/result/0018_mbind.log @@ -0,0 +1,61 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22073344, pages: 5389 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101278000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fae020 ffff88085056a0c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff88085056ad20): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff88085056ae40): free failed. -32 + diff --git a/test/mbind/result/0019_mbind.log b/test/mbind/result/0019_mbind.log new file mode 100644 index 00000000..22543e75 --- /dev/null +++ b/test/mbind/result/0019_mbind.log @@ -0,0 +1,74 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808505b2600): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808505b2a80): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808505b2360): free failed. -32 + diff --git a/test/mbind/result/0020_mbind.log b/test/mbind/result/0020_mbind.log new file mode 100644 index 00000000..eabad022 --- /dev/null +++ b/test/mbind/result/0020_mbind.log @@ -0,0 +1,134 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab442000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab442000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab442000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab444000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab444000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab444000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab446000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab446000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab446000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab448000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab448000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab448000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab44a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab44a000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab44a000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44c000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44c000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab442000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab444000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab446000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab448000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44a000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88085045c120): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085045c900): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085045ce40): free failed. -32 + diff --git a/test/mbind/result/0021_mbind.log b/test/mbind/result/0021_mbind.log new file mode 100644 index 00000000..6d10410c --- /dev/null +++ b/test/mbind/result/0021_mbind.log @@ -0,0 +1,54 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808505eac00): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808505eaa80): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808505eaba0): free failed. -32 + diff --git a/test/mbind/result/0022_mbind.log b/test/mbind/result/0022_mbind.log new file mode 100644 index 00000000..716c7162 --- /dev/null +++ b/test/mbind/result/0022_mbind.log @@ -0,0 +1,55 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051f480): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051fde0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051ff60): free failed. -32 + diff --git a/test/mbind/result/0023_mbind.log b/test/mbind/result/0023_mbind.log new file mode 100644 index 00000000..b851759a --- /dev/null +++ b/test/mbind/result/0023_mbind.log @@ -0,0 +1,55 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fad020 ffff8808506f98a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808506f9a80): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808506f9de0): free failed. -32 + diff --git a/test/mbind/result/0024_mbind.log b/test/mbind/result/0024_mbind.log new file mode 100644 index 00000000..d8d2a1b9 --- /dev/null +++ b/test/mbind/result/0024_mbind.log @@ -0,0 +1,64 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_INTERLEAVE) rst:-1 (MPOL_INTERLEAVE is not implemented yet) +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22073344, pages: 5389 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101278000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fae020 ffff88085056acc0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff88085056aea0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff88085056aae0): free failed. -32 + diff --git a/test/mbind/result/0025_mbind.log b/test/mbind/result/0025_mbind.log new file mode 100644 index 00000000..306b5497 --- /dev/null +++ b/test/mbind/result/0025_mbind.log @@ -0,0 +1,52 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22073344, pages: 5389 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fae020 ffff8808505b2c00): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff8808505b2d20): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff8808505b2e40): free failed. -32 + diff --git a/test/mbind/result/0026_mbind.log b/test/mbind/result/0026_mbind.log new file mode 100644 index 00000000..d6fa4a97 --- /dev/null +++ b/test/mbind/result/0026_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x3 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fad020 ffff88085056a060): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085056a120): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085056ac00): free failed. -32 + diff --git a/test/mbind/result/0027_mbind.log b/test/mbind/result/0027_mbind.log new file mode 100644 index 00000000..e00baf4b --- /dev/null +++ b/test/mbind/result/0027_mbind.log @@ -0,0 +1,51 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x3 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22077440, pages: 5390 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fad020 ffff88085056ad80): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085056aa80): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085056a780): free failed. -32 + diff --git a/test/mbind/result/0028_mbind.log b/test/mbind/result/0028_mbind.log new file mode 100644 index 00000000..b4e8050f --- /dev/null +++ b/test/mbind/result/0028_mbind.log @@ -0,0 +1,53 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8003 0x3 2 0x8000 0x0 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 +----- +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 22073344, pages: 5389 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 33554432, pages: 8192 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000005000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000007000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fae020 ffff8808533d2960): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff8808533d23c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff8808533d2d20): free failed. -32 + diff --git a/test/mbind/result/0029_mbind.log b/test/mbind/result/0029_mbind.log new file mode 100644 index 00000000..05c9beb9 --- /dev/null +++ b/test/mbind/result/0029_mbind.log @@ -0,0 +1,66 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d24e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d25a0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d2840): free failed. -32 + diff --git a/test/mbind/result/0030_mbind.log b/test/mbind/result/0030_mbind.log new file mode 100644 index 00000000..ec6c6751 --- /dev/null +++ b/test/mbind/result/0030_mbind.log @@ -0,0 +1,66 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d2a20): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d2660): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d2900): free failed. -32 + diff --git a/test/mbind/result/0031_mbind.log b/test/mbind/result/0031_mbind.log new file mode 100644 index 00000000..dee20e1a --- /dev/null +++ b/test/mbind/result/0031_mbind.log @@ -0,0 +1,66 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff88085045c840): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff88085045ce40): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff88085045cc60): free failed. -32 + diff --git a/test/mbind/result/0032_mbind.log b/test/mbind/result/0032_mbind.log new file mode 100644 index 00000000..5662d0ce --- /dev/null +++ b/test/mbind/result/0032_mbind.log @@ -0,0 +1,72 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525512704, pages: 128299 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010129d000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43b000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff8801012a0000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808505b2d80): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808505b2c00): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808505b2d20): free failed. -32 + diff --git a/test/mbind/result/0033_mbind.log b/test/mbind/result/0033_mbind.log new file mode 100644 index 00000000..d1e8e64b --- /dev/null +++ b/test/mbind/result/0033_mbind.log @@ -0,0 +1,86 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d2840): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d24e0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d2de0): free failed. -32 + diff --git a/test/mbind/result/0034_mbind.log b/test/mbind/result/0034_mbind.log new file mode 100644 index 00000000..521d792b --- /dev/null +++ b/test/mbind/result/0034_mbind.log @@ -0,0 +1,146 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab441000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab441000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab441000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab443000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab443000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab443000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab445000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab445000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab445000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab447000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab447000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab447000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab449000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab449000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab449000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44b000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44b000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab441000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab443000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab445000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab447000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab449000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff88085045cf00): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff88085045cd80): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff88085045c300): free failed. -32 + diff --git a/test/mbind/result/0035_mbind.log b/test/mbind/result/0035_mbind.log new file mode 100644 index 00000000..d6212516 --- /dev/null +++ b/test/mbind/result/0035_mbind.log @@ -0,0 +1,66 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808506f97e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808506f9b40): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808506f9960): free failed. -32 + diff --git a/test/mbind/result/0036_mbind.log b/test/mbind/result/0036_mbind.log new file mode 100644 index 00000000..beb6ad88 --- /dev/null +++ b/test/mbind/result/0036_mbind.log @@ -0,0 +1,67 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808533d2600): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808533d2c00): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808533d2ea0): free failed. -32 + diff --git a/test/mbind/result/0037_mbind.log b/test/mbind/result/0037_mbind.log new file mode 100644 index 00000000..e30d3948 --- /dev/null +++ b/test/mbind/result/0037_mbind.log @@ -0,0 +1,67 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd2020 ffff88085051fcc0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff88085051f720): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff88085051f3c0): free failed. -32 + diff --git a/test/mbind/result/0038_mbind.log b/test/mbind/result/0038_mbind.log new file mode 100644 index 00000000..6d619561 --- /dev/null +++ b/test/mbind/result/0038_mbind.log @@ -0,0 +1,75 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_INTERLEAVE) rst:-1 (MPOL_INTERLEAVE is not implemented yet) +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525512704, pages: 128299 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010129d000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43b000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff8801012a0000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fd3020 ffff8808506f9a20): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff8808506f9cc0): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff8808506f9de0): free failed. -32 + diff --git a/test/mbind/result/0039_mbind.log b/test/mbind/result/0039_mbind.log new file mode 100644 index 00000000..379760e1 --- /dev/null +++ b/test/mbind/result/0039_mbind.log @@ -0,0 +1,63 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525512704, pages: 128299 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd3020 ffff88085051ff60): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff88085051f5a0): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff88085051f900): free failed. -32 + diff --git a/test/mbind/result/0040_mbind.log b/test/mbind/result/0040_mbind.log new file mode 100644 index 00000000..01ffda6c --- /dev/null +++ b/test/mbind/result/0040_mbind.log @@ -0,0 +1,63 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x1 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808506f9ba0): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808506f9f00): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808506f9a80): free failed. -32 + diff --git a/test/mbind/result/0041_mbind.log b/test/mbind/result/0041_mbind.log new file mode 100644 index 00000000..2cdf2b43 --- /dev/null +++ b/test/mbind/result/0041_mbind.log @@ -0,0 +1,63 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x1 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed4000 - 0x102400000, 22200320 bytes, 5420 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525516800, pages: 128300 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef7000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd2020 ffff8808505b2e40): free failed. -32 +[ 0]: fileobj_free(ffff880100fec020 ffff8808505b2ae0): free failed. -32 +[ 0]: fileobj_free(ffff88010120a020 ffff8808505b2840): free failed. -32 + diff --git a/test/mbind/result/0042_mbind.log b/test/mbind/result/0042_mbind.log new file mode 100644 index 00000000..812341be --- /dev/null +++ b/test/mbind/result/0042_mbind.log @@ -0,0 +1,64 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8003 0x1 1 0x8000 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ed5000 - 0x102400000, 22196224 bytes, 5419 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525512704, pages: 128299 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000009000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff86000000b000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100ef8000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f84000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f87000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fab000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb9000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fba000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd2000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101200000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101222000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101223000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101251000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101295000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101298000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fd3020 ffff88085051fc00): free failed. -32 +[ 0]: fileobj_free(ffff880100fed020 ffff88085051fd80): free failed. -32 +[ 0]: fileobj_free(ffff88010120b020 ffff88085051fb40): free failed. -32 + diff --git a/test/mbind/result/0043_mbind.log b/test/mbind/result/0043_mbind.log new file mode 100644 index 00000000..1ff0132b --- /dev/null +++ b/test/mbind/result/0043_mbind.log @@ -0,0 +1,84 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051fde0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051f720): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051fcc0): free failed. -32 + diff --git a/test/mbind/result/0044_mbind.log b/test/mbind/result/0044_mbind.log new file mode 100644 index 00000000..1610df70 --- /dev/null +++ b/test/mbind/result/0044_mbind.log @@ -0,0 +1,84 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808533d2d20): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808533d27e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808533d2ba0): free failed. -32 + diff --git a/test/mbind/result/0045_mbind.log b/test/mbind/result/0045_mbind.log new file mode 100644 index 00000000..6283a37d --- /dev/null +++ b/test/mbind/result/0045_mbind.log @@ -0,0 +1,84 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88085045c840): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085045cae0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085045cba0): free failed. -32 + diff --git a/test/mbind/result/0046_mbind.log b/test/mbind/result/0046_mbind.log new file mode 100644 index 00000000..521835d0 --- /dev/null +++ b/test/mbind/result/0046_mbind.log @@ -0,0 +1,91 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525389824, pages: 128269 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101278000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fae020 ffff8808506f95a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff8808506f9780): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff8808506f9660): free failed. -32 + diff --git a/test/mbind/result/0047_mbind.log b/test/mbind/result/0047_mbind.log new file mode 100644 index 00000000..931c7d65 --- /dev/null +++ b/test/mbind/result/0047_mbind.log @@ -0,0 +1,104 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff8808505eaf00): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808505ea6c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808505ea0c0): free failed. -32 + diff --git a/test/mbind/result/0048_mbind.log b/test/mbind/result/0048_mbind.log new file mode 100644 index 00000000..6e8049e3 --- /dev/null +++ b/test/mbind/result/0048_mbind.log @@ -0,0 +1,148 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab442000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab442000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab442000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab444000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab444000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab444000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab446000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab446000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab446000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab448000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab448000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab448000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab44a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab44a000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab44a000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44c000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44c000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +s available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab442000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab444000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab446000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab448000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44a000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051fe40): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051fd20): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051f540): free failed. -32 + diff --git a/test/mbind/result/0049_mbind.log b/test/mbind/result/0049_mbind.log new file mode 100644 index 00000000..3d9c0741 --- /dev/null +++ b/test/mbind/result/0049_mbind.log @@ -0,0 +1,84 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fad020 ffff88083f7dd6c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88083f7dd7e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88083f7dd240): free failed. -32 + diff --git a/test/mbind/result/0050_mbind.log b/test/mbind/result/0050_mbind.log new file mode 100644 index 00000000..c0bca327 --- /dev/null +++ b/test/mbind/result/0050_mbind.log @@ -0,0 +1,85 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fad020 ffff8808504b2d80): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff8808504b2ea0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff8808504b2960): free failed. -32 + diff --git a/test/mbind/result/0051_mbind.log b/test/mbind/result/0051_mbind.log new file mode 100644 index 00000000..a85a401e --- /dev/null +++ b/test/mbind/result/0051_mbind.log @@ -0,0 +1,85 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051fde0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051f720): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051f480): free failed. -32 + diff --git a/test/mbind/result/0052_mbind.log b/test/mbind/result/0052_mbind.log new file mode 100644 index 00000000..43b06296 --- /dev/null +++ b/test/mbind/result/0052_mbind.log @@ -0,0 +1,94 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_INTERLEAVE) rst:-1 (MPOL_INTERLEAVE is not implemented yet) +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525389824, pages: 128269 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101278000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127b000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fae020 ffff88085056a8a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff88085056acc0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff88085056a900): free failed. -32 + diff --git a/test/mbind/result/0053_mbind.log b/test/mbind/result/0053_mbind.log new file mode 100644 index 00000000..4d43de19 --- /dev/null +++ b/test/mbind/result/0053_mbind.log @@ -0,0 +1,82 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525389824, pages: 128269 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fae020 ffff8808506f97e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff8808506f9c60): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff8808506f9840): free failed. -32 + diff --git a/test/mbind/result/0054_mbind.log b/test/mbind/result/0054_mbind.log new file mode 100644 index 00000000..59e9c6c5 --- /dev/null +++ b/test/mbind/result/0054_mbind.log @@ -0,0 +1,81 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x3 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051f540): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051ff00): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051fcc0): free failed. -32 + diff --git a/test/mbind/result/0055_mbind.log b/test/mbind/result/0055_mbind.log new file mode 100644 index 00000000..e3bd5c4e --- /dev/null +++ b/test/mbind/result/0055_mbind.log @@ -0,0 +1,81 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x3 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef2000 - 0x102400000, 22077440 bytes, 5390 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10bc00000 - 0x10dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10dc00000 - 0x10fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10fc00000 - 0x111c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x111c00000 - 0x113c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x113c00000 - 0x115c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x115c00000 - 0x117c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x117c00000 - 0x119c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x119c00000 - 0x11bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11bc00000 - 0x11dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11dc00000 - 0x11fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11fc00000 - 0x121c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x121c00000 - 0x123c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x123c00000 - 0x125c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x125c00000 - 0x127c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x127c00000 - 0x129c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525393920, pages: 128270 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fad020 ffff88085051fe40): free failed. -32 +[ 0]: fileobj_free(ffff880100fc7020 ffff88085051fba0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe5020 ffff88085051f480): free failed. -32 + diff --git a/test/mbind/result/0056_mbind.log b/test/mbind/result/0056_mbind.log new file mode 100644 index 00000000..99d9c8de --- /dev/null +++ b/test/mbind/result/0056_mbind.log @@ -0,0 +1,83 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8003 0x3 2 0x8000 0x0 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 +----- +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +IHK/McKernel started. +[ -1]: no_execute_available: 1 +[ -1]: NUM_PERF_COUNTERS: 4, NUM_FIXED_PERF_COUNTERS: 3 +[ -1]: Invariant TSC supported. +[ -1]: setup_x86 done. +[ -1]: ns_per_tsc: 384 +[ -1]: KCommand Line: hidos dump_level=24 time_sharing +[ -1]: Physical memory: 0x100ef3000 - 0x102400000, 22073344 bytes, 5389 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10c000000 - 0x10e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x10e000000 - 0x110000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x110000000 - 0x112000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x112000000 - 0x114000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x114000000 - 0x116000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x116000000 - 0x118000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x118000000 - 0x11a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11a000000 - 0x11c000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11c000000 - 0x11e000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x11e000000 - 0x120000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x120000000 - 0x122000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x122000000 - 0x124000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x124000000 - 0x126000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x126000000 - 0x128000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x128000000 - 0x12a000000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x880400000 - 0x882400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x882400000 - 0x884400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x884400000 - 0x886400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x886400000 - 0x888400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x888400000 - 0x88a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88a400000 - 0x88c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88c400000 - 0x88e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x88e400000 - 0x890400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x890400000 - 0x892400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x892400000 - 0x894400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x894400000 - 0x896400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x896400000 - 0x898400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x898400000 - 0x89a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89a400000 - 0x89c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89c400000 - 0x89e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x89e400000 - 0x8a0400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 525389824, pages: 128269 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 536870912, pages: 131072 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff86000000e000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000010000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f5f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f62000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f86000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f94000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f95000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fad000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd8000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100ffe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010122c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101256000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101266000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101270000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101273000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fae020 ffff88085051fea0): free failed. -32 +[ 0]: fileobj_free(ffff880100fc8020 ffff88085051f8a0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe6020 ffff88085051ff00): free failed. -32 + diff --git a/test/mbind/result/0057_mbind.log b/test/mbind/result/0057_mbind.log new file mode 100644 index 00000000..630f9523 --- /dev/null +++ b/test/mbind/result/0057_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +vailable @ NUMA: 0 +[ -1]: Physical memory: 0x193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff88085045c720): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff88085045c240): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff88085045c960): free failed. -32 + diff --git a/test/mbind/result/0058_mbind.log b/test/mbind/result/0058_mbind.log new file mode 100644 index 00000000..71845b61 --- /dev/null +++ b/test/mbind/result/0058_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +le @ NUMA: 0 +[ -1]: Physical memory: 0x193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808533d2600): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808533d2de0): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff8808533d2c60): free failed. -32 + diff --git a/test/mbind/result/0059_mbind.log b/test/mbind/result/0059_mbind.log new file mode 100644 index 00000000..1435e5ca --- /dev/null +++ b/test/mbind/result/0059_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +ailable @ NUMA: 0 +[ -1]: Physical memory: 0x193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff88085045c1e0): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff88085045ccc0): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff88085045c7e0): free failed. -32 + diff --git a/test/mbind/result/0060_mbind.log b/test/mbind/result/0060_mbind.log new file mode 100644 index 00000000..501508e3 --- /dev/null +++ b/test/mbind/result/0060_mbind.log @@ -0,0 +1,94 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +A: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283592704, pages: 1045799 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efc000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f88000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100faf000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd6000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101226000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101227000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101255000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101299000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010129c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff8801012a1000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43b000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff8801012a4000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd7020 ffff8808506f98a0): free failed. -32 +[ 0]: fileobj_free(ffff880100ff1020 ffff8808506f9660): free failed. -32 +[ 0]: fileobj_free(ffff88010120f020 ffff8808506f95a0): free failed. -32 + diff --git a/test/mbind/result/0061.log b/test/mbind/result/0061.log new file mode 100644 index 00000000..76a9e550 --- /dev/null +++ b/test/mbind/result/0061.log @@ -0,0 +1 @@ +./mbind_test.sh: line 12: ./testcases/0061.txt: No such file or directory diff --git a/test/mbind/result/0061_mbind.log b/test/mbind/result/0061_mbind.log new file mode 100644 index 00000000..36a02065 --- /dev/null +++ b/test/mbind/result/0061_mbind.log @@ -0,0 +1,114 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808533d2c60): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808533d2f60): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff881050744720): free failed. -32 + diff --git a/test/mbind/result/0062_mbind.log b/test/mbind/result/0062_mbind.log new file mode 100644 index 00000000..8966cbc6 --- /dev/null +++ b/test/mbind/result/0062_mbind.log @@ -0,0 +1,147 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x80ff 0x1 1 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43d000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43d000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43d000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab43f000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab43f000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab43f000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab441000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab441000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab441000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab443000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab443000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab443000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab445000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab445000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab445000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab447000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab447000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab447000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab449000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab449000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab449000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44b000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44b000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43f000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab441000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab443000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab445000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab447000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab449000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff88085051ff00): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff88085051fd80): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff88085051f900): free failed. -32 + diff --git a/test/mbind/result/0063_mbind.log b/test/mbind/result/0063_mbind.log new file mode 100644 index 00000000..919e1bde --- /dev/null +++ b/test/mbind/result/0063_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +vailable @ NUMA: 0 +[ -1]: Physical memory: 0x193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808505b2900): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808505b2d20): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff8808505b22a0): free failed. -32 + diff --git a/test/mbind/result/0064_mbind.log b/test/mbind/result/0064_mbind.log new file mode 100644 index 00000000..71d31182 --- /dev/null +++ b/test/mbind/result/0064_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +UMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808533d2c60): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808533d27e0): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff8808533d2600): free failed. -32 + diff --git a/test/mbind/result/0065_mbind.log b/test/mbind/result/0065_mbind.log new file mode 100644 index 00000000..a64bf675 --- /dev/null +++ b/test/mbind/result/0065_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x1 1 0x8000 0x0 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43b000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +0000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808502a7000): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808502a73c0): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff8808502a7780): free failed. -32 + diff --git a/test/mbind/result/0066_mbind.log b/test/mbind/result/0066_mbind.log new file mode 100644 index 00000000..a2a2750c --- /dev/null +++ b/test/mbind/result/0066_mbind.log @@ -0,0 +1,2 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +Error: failed to mcreboot diff --git a/test/mbind/result/0067_mbind.log b/test/mbind/result/0067_mbind.log new file mode 100644 index 00000000..e8742e3a --- /dev/null +++ b/test/mbind/result/0067_mbind.log @@ -0,0 +1,92 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 1 0x8003 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +92 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283592704, pages: 1045799 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efc000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f88000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100faf000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd6000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101226000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101227000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101255000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101299000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010129c000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fd7020 ffff880851c7da80): free failed. -32 +[ 0]: fileobj_free(ffff880100ff1020 ffff880851c7dc60): free failed. -32 +[ 0]: fileobj_free(ffff88010120f020 ffff880851c7da20): free failed. -32 + diff --git a/test/mbind/result/0068_mbind.log b/test/mbind/result/0068_mbind.log new file mode 100644 index 00000000..cf5f3514 --- /dev/null +++ b/test/mbind/result/0068_mbind.log @@ -0,0 +1,99 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x1 1 0x8002 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fd6020 ffff88085051f540): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff88085051f660): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff88085051fe40): free failed. -32 + diff --git a/test/mbind/result/0069_mbind.log b/test/mbind/result/0069_mbind.log new file mode 100644 index 00000000..bbdf120d --- /dev/null +++ b/test/mbind/result/0069_mbind.log @@ -0,0 +1,100 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x1 1 0x8001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x1 maxnode:1 +----- +[00] OK:shmat - addr:(0x00002aaaab43b000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +ges available @ NUMA: 0 +[ -1]: Physical memory: 0x193c00000 - 0x195c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x195c00000 - 0x197c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x197c00000 - 0x199c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x199c00000 - 0x19bc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19bc00000 - 0x19dc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19dc00000 - 0x19fc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x19fc00000 - 0x1a1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a1c00000 - 0x1a3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a3c00000 - 0x1a5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283596800, pages: 1045800 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efb000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43b000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fd6020 ffff8808533d2ea0): free failed. -32 +[ 0]: fileobj_free(ffff880100ff0020 ffff8808533d2a20): free failed. -32 +[ 0]: fileobj_free(ffff88010120e020 ffff8808533d2660): free failed. -32 + diff --git a/test/mbind/result/0070_mbind.log b/test/mbind/result/0070_mbind.log new file mode 100644 index 00000000..0b9727f8 --- /dev/null +++ b/test/mbind/result/0070_mbind.log @@ -0,0 +1,92 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8003 0x1 1 0x8000 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 +----- +[00] OK:mbind - addr:(0x00002aaaab43b000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43b000) mode:(MPOL_DEFAULT) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +tes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a5c00000 - 0x1a7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a7c00000 - 0x1a9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1a9c00000 - 0x1abc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1abc00000 - 0x1adc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1adc00000 - 0x1afc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1afc00000 - 0x1b1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b1c00000 - 0x1b3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b3c00000 - 0x1b5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b5c00000 - 0x1b7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b7c00000 - 0x1b9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1b9c00000 - 0x1bbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bbc00000 - 0x1bdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bdc00000 - 0x1bfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1bfc00000 - 0x1c1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c1c00000 - 0x1c3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c3c00000 - 0x1c5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c5c00000 - 0x1c7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c7c00000 - 0x1c9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1c9c00000 - 0x1cbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cbc00000 - 0x1cdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cdc00000 - 0x1cfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1cfc00000 - 0x1d1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d1c00000 - 0x1d3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d3c00000 - 0x1d5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d5c00000 - 0x1d7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d7c00000 - 0x1d9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1d9c00000 - 0x1dbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dbc00000 - 0x1ddc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ddc00000 - 0x1dfc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1dfc00000 - 0x1e1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e1c00000 - 0x1e3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e3c00000 - 0x1e5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e5c00000 - 0x1e7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e7c00000 - 0x1e9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1e9c00000 - 0x1ebc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ebc00000 - 0x1edc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1edc00000 - 0x1efc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1efc00000 - 0x1f1c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f1c00000 - 0x1f3c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f3c00000 - 0x1f5c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f5c00000 - 0x1f7c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f7c00000 - 0x1f9c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1f9c00000 - 0x1fbc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fbc00000 - 0x1fdc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1fdc00000 - 0x1ffc00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x1ffc00000 - 0x201c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x201c00000 - 0x203c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x203c00000 - 0x205c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x205c00000 - 0x207c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: Physical memory: 0x207c00000 - 0x209c00000, 33554432 bytes, 8192 pages available @ NUMA: 0 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283592704, pages: 1045799 +[ -1]: NUMA 0 distances: 0 (10), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000026000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000028000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880100efc000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f88000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8b000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100faf000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbd000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fbe000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fd6000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101226000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101227000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101255000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010128f000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101299000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010129c000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fd7020 ffff8808533d2d80): free failed. -32 +[ 0]: fileobj_free(ffff880100ff1020 ffff8808533d2660): free failed. -32 +[ 0]: fileobj_free(ffff88010120f020 ffff8808533d29c0): free failed. -32 + diff --git a/test/mbind/result/0071_mbind.log b/test/mbind/result/0071_mbind.log new file mode 100644 index 00000000..38ddfe53 --- /dev/null +++ b/test/mbind/result/0071_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +emory: 0x90c400000 - 0x90e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808506f9960): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808506f9ae0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808506f9e40): free failed. -32 + diff --git a/test/mbind/result/0072_mbind.log b/test/mbind/result/0072_mbind.log new file mode 100644 index 00000000..98570e9b --- /dev/null +++ b/test/mbind/result/0072_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg + 0x90c400000 - 0x90e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff880852129060): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff880852129960): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff880852129300): free failed. -32 + diff --git a/test/mbind/result/0073_mbind.log b/test/mbind/result/0073_mbind.log new file mode 100644 index 00000000..13d38837 --- /dev/null +++ b/test/mbind/result/0073_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +mory: 0x90c400000 - 0x90e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808506ce960): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808506cea20): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808506ce6c0): free failed. -32 + diff --git a/test/mbind/result/0074_mbind.log b/test/mbind/result/0074_mbind.log new file mode 100644 index 00000000..923248b3 --- /dev/null +++ b/test/mbind/result/0074_mbind.log @@ -0,0 +1,93 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283469824, pages: 1045769 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f63000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f66000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f98000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f99000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb1000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fdc000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101202000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101230000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010125a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101274000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101277000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127f000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb2020 ffff8808533d2960): free failed. -32 +[ 0]: fileobj_free(ffff880100fcc020 ffff8808533d2540): free failed. -32 +[ 0]: fileobj_free(ffff880100fea020 ffff8808533d2840): free failed. -32 + diff --git a/test/mbind/result/0075_mbind.log b/test/mbind/result/0075_mbind.log new file mode 100644 index 00000000..b36e21f1 --- /dev/null +++ b/test/mbind/result/0075_mbind.log @@ -0,0 +1,114 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 3 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +sical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808505b2420): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808505b27e0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808505b2f60): free failed. -32 + diff --git a/test/mbind/result/0076_mbind.log b/test/mbind/result/0076_mbind.log new file mode 100644 index 00000000..b4b9cc4c --- /dev/null +++ b/test/mbind/result/0076_mbind.log @@ -0,0 +1,148 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x80ff 0x3 2 0 9 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x22 +[01] OK:mbind - addr:(0x00002aaaab43e000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[01] OK:get_mempolicy - addr:(0x00002aaaab43e000) mode:(MPOL_PREFERRED) +[01] OK:munmap - addr:(0x00002aaaab43e000) len:4096 +[01] OK:mmap - addr:(0x00002aaaab43e000) len:4096 prot:0x3 flags:0x32 +[01] OK:mmap - addr:(0x00002aaaab43f000) len:4096 prot:0x3 flags:0x22 +----- +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x22 +[02] OK:mbind - addr:(0x00002aaaab440000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[02] OK:get_mempolicy - addr:(0x00002aaaab440000) mode:(MPOL_BIND) +[02] OK:munmap - addr:(0x00002aaaab440000) len:4096 +[02] OK:mmap - addr:(0x00002aaaab440000) len:4096 prot:0x3 flags:0x32 +[02] OK:mmap - addr:(0x00002aaaab441000) len:4096 prot:0x3 flags:0x22 +----- +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x22 +[03] OK:mbind - addr:(0x00002aaaab442000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[03] OK:get_mempolicy - addr:(0x00002aaaab442000) mode:(MPOL_DEFAULT) +[03] OK:munmap - addr:(0x00002aaaab442000) len:4096 +[03] OK:mmap - addr:(0x00002aaaab442000) len:4096 prot:0x3 flags:0x32 +[03] OK:mmap - addr:(0x00002aaaab443000) len:4096 prot:0x3 flags:0x22 +----- +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x22 +[04] OK:mbind - addr:(0x00002aaaab444000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[04] OK:get_mempolicy - addr:(0x00002aaaab444000) mode:(MPOL_PREFERRED) +[04] OK:munmap - addr:(0x00002aaaab444000) len:4096 +[04] OK:mmap - addr:(0x00002aaaab444000) len:4096 prot:0x3 flags:0x32 +[04] OK:mmap - addr:(0x00002aaaab445000) len:4096 prot:0x3 flags:0x22 +----- +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x22 +[05] OK:mbind - addr:(0x00002aaaab446000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[05] OK:get_mempolicy - addr:(0x00002aaaab446000) mode:(MPOL_BIND) +[05] OK:munmap - addr:(0x00002aaaab446000) len:4096 +[05] OK:mmap - addr:(0x00002aaaab446000) len:4096 prot:0x3 flags:0x32 +[05] OK:mmap - addr:(0x00002aaaab447000) len:4096 prot:0x3 flags:0x22 +----- +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x22 +[06] OK:mbind - addr:(0x00002aaaab448000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[06] OK:get_mempolicy - addr:(0x00002aaaab448000) mode:(MPOL_DEFAULT) +[06] OK:munmap - addr:(0x00002aaaab448000) len:4096 +[06] OK:mmap - addr:(0x00002aaaab448000) len:4096 prot:0x3 flags:0x32 +[06] OK:mmap - addr:(0x00002aaaab449000) len:4096 prot:0x3 flags:0x22 +----- +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x22 +[07] OK:mbind - addr:(0x00002aaaab44a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[07] OK:get_mempolicy - addr:(0x00002aaaab44a000) mode:(MPOL_PREFERRED) +[07] OK:munmap - addr:(0x00002aaaab44a000) len:4096 +[07] OK:mmap - addr:(0x00002aaaab44a000) len:4096 prot:0x3 flags:0x32 +[07] OK:mmap - addr:(0x00002aaaab44b000) len:4096 prot:0x3 flags:0x22 +----- +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x22 +[08] OK:mbind - addr:(0x00002aaaab44c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[08] OK:get_mempolicy - addr:(0x00002aaaab44c000) mode:(MPOL_BIND) +[08] OK:munmap - addr:(0x00002aaaab44c000) len:4096 +[08] OK:mmap - addr:(0x00002aaaab44c000) len:4096 prot:0x3 flags:0x32 +[08] OK:mmap - addr:(0x00002aaaab44d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +ailable @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43e000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab440000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab442000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab444000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab446000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab448000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44a000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab44c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808533d2ea0): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808533d2e40): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808533d24e0): free failed. -32 + diff --git a/test/mbind/result/0077_mbind.log b/test/mbind/result/0077_mbind.log new file mode 100644 index 00000000..f7a2a54f --- /dev/null +++ b/test/mbind/result/0077_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +emory: 0x90c400000 - 0x90e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=0 +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x0000000000000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808505b2780): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808505b2ba0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808505b2960): free failed. -32 + diff --git a/test/mbind/result/0078_mbind.log b/test/mbind/result/0078_mbind.log new file mode 100644 index 00000000..6be360b8 --- /dev/null +++ b/test/mbind/result/0078_mbind.log @@ -0,0 +1,103 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fb1020 ffff880851c7dd20): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff880851c7d660): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff880851c7d600): free failed. -32 + diff --git a/test/mbind/result/0079_mbind.log b/test/mbind/result/0079_mbind.log new file mode 100644 index 00000000..e1160e64 --- /dev/null +++ b/test/mbind/result/0079_mbind.log @@ -0,0 +1,104 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:munmap - addr:(0x00002aaaab43c000) len:4096 +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node: couldn't fulfill user policy for 1 pages +[ 0]: mckernel_allocate_aligned_pages_node[800]: applying addr-policy (and it's default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fb1020 ffff88085056a600): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff88085056a0c0): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff88085056a960): free failed. -32 + diff --git a/test/mbind/result/0080_mbind.log b/test/mbind/result/0080_mbind.log new file mode 100644 index 00000000..7dd9c190 --- /dev/null +++ b/test/mbind/result/0080_mbind.log @@ -0,0 +1,94 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x3 2 0x8000 0x0 2 1 1 +----- +OK:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 +OK:get_mempolicy - mode:(MPOL_INTERLEAVE) rst:-1 (MPOL_INTERLEAVE is not implemented yet) +----- +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x22 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 flags:1 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_DEFAULT) +[00] OK:mmap - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x32 +[00] OK:mmap - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg + available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283469824, pages: 1045769 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f63000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f66000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f98000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f99000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb1000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fdc000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101202000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101230000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010125a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101274000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101277000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 2aaaab43c000, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[662]: non-default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[803]: default addr-policy found, addr(0x00002aaaab43c000) policy(MPOL_INTERLEAVE) +[ 0]: mckernel_allocate_aligned_pages_node[645]: virt_addr: 0, policy: MPOL_INTERLEAVE +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010127f000) policy(MPOL_INTERLEAVE) +[ 0]: fileobj_free(ffff880100fb2020 ffff8808505ead80): free failed. -32 +[ 0]: fileobj_free(ffff880100fcc020 ffff8808505eac00): free failed. -32 +[ 0]: fileobj_free(ffff880100fea020 ffff8808505ea1e0): free failed. -32 + diff --git a/test/mbind/result/0081_mbind.log b/test/mbind/result/0081_mbind.log new file mode 100644 index 00000000..e5a5041f --- /dev/null +++ b/test/mbind/result/0081_mbind.log @@ -0,0 +1,92 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8000 0x0 2 0x8003 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:2 +----- +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_INTERLEAVE) +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +ges available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283469824, pages: 1045769 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f63000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f66000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f8a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101000000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f98000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100f99000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fb1000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880100fdc000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101201000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101202000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101230000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010125a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff88010126a000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101274000) policy(MPOL_DEFAULT) +[ 0]: mckernel_allocate_aligned_pages_node[806]: addr-policy not found or default addr-policy found, addr(0xffff880101277000) policy(MPOL_DEFAULT) +[ 0]: fileobj_free(ffff880100fb2020 ffff88085056ab40): free failed. -32 +[ 0]: fileobj_free(ffff880100fcc020 ffff88085056aa20): free failed. -32 +[ 0]: fileobj_free(ffff880100fea020 ffff88085056af60): free failed. -32 + diff --git a/test/mbind/result/0082_mbind.log b/test/mbind/result/0082_mbind.log new file mode 100644 index 00000000..f2d86b8a --- /dev/null +++ b/test/mbind/result/0082_mbind.log @@ -0,0 +1,100 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8001 0x3 2 0x8002 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_BIND) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_BIND) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +tes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=1 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_PREFERRED) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808533d2660): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808533d2c60): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808533d2d80): free failed. -32 + diff --git a/test/mbind/result/0083_mbind.log b/test/mbind/result/0083_mbind.log new file mode 100644 index 00000000..d96ddab4 --- /dev/null +++ b/test/mbind/result/0083_mbind.log @@ -0,0 +1,100 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind_shared 0x8002 0x3 2 0x8001 0x3 2 0 1 +----- +OK:set_mempolicy - mode:(MPOL_BIND) nodemask:0x3 maxnode:2 +----- +[00] OK:shmat - addr:(0x00002aaaab43c000) len:4096 prot:0x3 flags:0x8021 +[00] OK:mbind - addr:(0x00002aaaab43c000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x3 maxnode:2 flags:0 +[00] OK:get_mempolicy - addr:(0x00002aaaab43c000) mode:(MPOL_PREFERRED) +[00] OK:shmat - addr:(0x00002aaaab43d000) len:4096 prot:0x3 flags:0x22 +----- +/home/m-takagi/project/os/install/sbin/ihkosctl 0 kmsg +cal memory: 0x90c400000 - 0x90e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x90e400000 - 0x910400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x910400000 - 0x912400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x912400000 - 0x914400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x914400000 - 0x916400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x916400000 - 0x918400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x918400000 - 0x91a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91a400000 - 0x91c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91c400000 - 0x91e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x91e400000 - 0x920400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x920400000 - 0x922400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x922400000 - 0x924400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x924400000 - 0x926400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x926400000 - 0x928400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x928400000 - 0x92a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92a400000 - 0x92c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92c400000 - 0x92e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x92e400000 - 0x930400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x930400000 - 0x932400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x932400000 - 0x934400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x934400000 - 0x936400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x936400000 - 0x938400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x938400000 - 0x93a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93a400000 - 0x93c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93c400000 - 0x93e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x93e400000 - 0x940400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x940400000 - 0x942400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x942400000 - 0x944400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x944400000 - 0x946400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x946400000 - 0x948400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x948400000 - 0x94a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94a400000 - 0x94c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94c400000 - 0x94e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x94e400000 - 0x950400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x950400000 - 0x952400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x952400000 - 0x954400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x954400000 - 0x956400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x956400000 - 0x958400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x958400000 - 0x95a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95a400000 - 0x95c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95c400000 - 0x95e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x95e400000 - 0x960400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x960400000 - 0x962400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x962400000 - 0x964400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x964400000 - 0x966400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x966400000 - 0x968400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x968400000 - 0x96a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96a400000 - 0x96c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96c400000 - 0x96e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x96e400000 - 0x970400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x970400000 - 0x972400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x972400000 - 0x974400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x974400000 - 0x976400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x976400000 - 0x978400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x978400000 - 0x97a400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97a400000 - 0x97c400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97c400000 - 0x97e400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: Physical memory: 0x97e400000 - 0x980400000, 33554432 bytes, 8192 pages available @ NUMA: 1 +[ -1]: NUMA: 0, Linux NUMA: 0, type: 1, available bytes: 4283473920, pages: 1045770 +[ -1]: NUMA: 1, Linux NUMA: 1, type: 1, available bytes: 4294967296, pages: 1048576 +[ -1]: NUMA 0 distances: 0 (10), 1 (21), +[ -1]: NUMA 1 distances: 1 (10), 0 (21), +[ -1]: map_fixed: phys: 0x90000 => 0xffff860000047000 (2 pages) +[ -1]: Trampoline area: 0x90000 +[ -1]: map_fixed: phys: 0x0 => 0xffff860000049000 (1 pages) +[ -1]: # of cpus : 8 +[ -1]: locals = ffff880880424000 +[ 0]: BSP: 0 (HW ID: 1 @ NUMA 0) +[ 0]: BSP: booted 7 AP CPUs +[ 0]: Master channel init acked. +[ 0]: vdso is enabled +IHK/McKernel booted. +[ 0]: numa_mem_policy=2 +[ 0]: mckernel_allocate_aligned_pages_node[669]: applying default-policy, addr(0x0000000000000000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaec7000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaeab830) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea4163) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf539d0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea61ae) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaea5cf8) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[738]: applying addr-policy (and it's not default-policy), addr(0x00002aaaab43c000) policy(MPOL_PREFERRED) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab43d000) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf601c0) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaab22f298) policy(MPOL_BIND) +[ 0]: mckernel_allocate_aligned_pages_node[808]: applying default-policy, addr(0x00002aaaaaf194f0) policy(MPOL_BIND) +[ 0]: fileobj_free(ffff880100fb1020 ffff8808505ea480): free failed. -32 +[ 0]: fileobj_free(ffff880100fcb020 ffff8808505ea660): free failed. -32 +[ 0]: fileobj_free(ffff880100fe9020 ffff8808505ea120): free failed. -32 + diff --git a/test/mbind/result/0084_mbind.log b/test/mbind/result/0084_mbind.log new file mode 100644 index 00000000..6b657a88 --- /dev/null +++ b/test/mbind/result/0084_mbind.log @@ -0,0 +1 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1,32M@1 diff --git a/test/mbind/result/0085_mbind.log b/test/mbind/result/0085_mbind.log new file mode 100644 index 00000000..47d6eec2 --- /dev/null +++ b/test/mbind/result/0085_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0086_mbind.log b/test/mbind/result/0086_mbind.log new file mode 100644 index 00000000..2bac2641 --- /dev/null +++ b/test/mbind/result/0086_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_BIND) nodemask:0x0 maxnode:1 flags:0 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0087_mbind.log b/test/mbind/result/0087_mbind.log new file mode 100644 index 00000000..f0de18d7 --- /dev/null +++ b/test/mbind/result/0087_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x0 maxnode:1 flags:0 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0088_mbind.log b/test/mbind/result/0088_mbind.log new file mode 100644 index 00000000..ecf93e85 --- /dev/null +++ b/test/mbind/result/0088_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8001 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0089_mbind.log b/test/mbind/result/0089_mbind.log new file mode 100644 index 00000000..e0affb70 --- /dev/null +++ b/test/mbind/result/0089_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0090_mbind.log b/test/mbind/result/0090_mbind.log new file mode 100644 index 00000000..614fb317 --- /dev/null +++ b/test/mbind/result/0090_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0091_mbind.log b/test/mbind/result/0091_mbind.log new file mode 100644 index 00000000..b6d0892c --- /dev/null +++ b/test/mbind/result/0091_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0xc001 0x1 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:0 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0092_mbind.log b/test/mbind/result/0092_mbind.log new file mode 100644 index 00000000..ce12ebef --- /dev/null +++ b/test/mbind/result/0092_mbind.log @@ -0,0 +1,5 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x1 1 0x8000 0x0 1 1 1 +----- +NG:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x1 maxnode:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0093_mbind.log b/test/mbind/result/0093_mbind.log new file mode 100644 index 00000000..23043772 --- /dev/null +++ b/test/mbind/result/0093_mbind.log @@ -0,0 +1,5 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8001 0x0 1 0x8000 0x0 1 1 1 +----- +NG:set_mempolicy - mode:(MPOL_PREFERRED) nodemask:0x0 maxnode:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0094_mbind.log b/test/mbind/result/0094_mbind.log new file mode 100644 index 00000000..04bc6cd8 --- /dev/null +++ b/test/mbind/result/0094_mbind.log @@ -0,0 +1,5 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8002 0x0 1 0x8000 0x0 1 1 1 +----- +NG:set_mempolicy - mode:(MPOL_BIND) nodemask:0x0 maxnode:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0095_mbind.log b/test/mbind/result/0095_mbind.log new file mode 100644 index 00000000..2e733c04 --- /dev/null +++ b/test/mbind/result/0095_mbind.log @@ -0,0 +1,5 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8003 0x0 1 0x8000 0x0 1 1 1 +----- +NG:set_mempolicy - mode:(MPOL_INTERLEAVE) nodemask:0x0 maxnode:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0096_mbind.log b/test/mbind/result/0096_mbind.log new file mode 100644 index 00000000..b12607c4 --- /dev/null +++ b/test/mbind/result/0096_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8000 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_DEFAULT) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0097_mbind.log b/test/mbind/result/0097_mbind.log new file mode 100644 index 00000000..51c3cdcd --- /dev/null +++ b/test/mbind/result/0097_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_BIND) nodemask:0x0 maxnode:1 flags:0 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0098_mbind.log b/test/mbind/result/0098_mbind.log new file mode 100644 index 00000000..58ab023e --- /dev/null +++ b/test/mbind/result/0098_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8003 0x0 1 0 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_INTERLEAVE) nodemask:0x0 maxnode:1 flags:0 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0099_mbind.log b/test/mbind/result/0099_mbind.log new file mode 100644 index 00000000..06f229c1 --- /dev/null +++ b/test/mbind/result/0099_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8001 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_PREFERRED) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/mbind/result/0100_mbind.log b/test/mbind/result/0100_mbind.log new file mode 100644 index 00000000..521608ae --- /dev/null +++ b/test/mbind/result/0100_mbind.log @@ -0,0 +1,9 @@ +/home/m-takagi/project/os/install/sbin/mcreboot.sh -m 32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0,32M@0 +/home/m-takagi/project/os/install/bin/mcexec mcexec_test_proc/exec_setmempolicy_mbind 0x8000 0x0 1 0x8002 0x1 1 1 1 +----- +OK:set_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +OK:get_mempolicy - mode:(MPOL_DEFAULT) nodemask:0x0 maxnode:1 +----- +[00] OK:mmap - addr:(0x00002aaaab42a000) len:4096 prot:0x3 flags:0x22 +[00] NG:mbind - addr:(0x00002aaaab42a000) len:4096 mode:(MPOL_BIND) nodemask:0x1 maxnode:1 flags:1 rst:-1 +Error: failed to mcexec diff --git a/test/qlmpi/qlmpi_testsuite/CT20.sh b/test/qlmpi/qlmpi_testsuite/CT20.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/CT21.sh b/test/qlmpi/qlmpi_testsuite/CT21.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/CT22.sh b/test/qlmpi/qlmpi_testsuite/CT22.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/go_ql_test.sh b/test/qlmpi/qlmpi_testsuite/go_ql_test.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/ql_irreg.sh b/test/qlmpi/qlmpi_testsuite/ql_irreg.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/ql_normal.sh b/test/qlmpi/qlmpi_testsuite/ql_normal.sh old mode 100755 new mode 100644 diff --git a/test/qlmpi/qlmpi_testsuite/util/mpiexec b/test/qlmpi/qlmpi_testsuite/util/mpiexec old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/aal_host.h b/test/rusage/verbs/aal_host.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/cas.c b/test/rusage/verbs/cas.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/curtime.c b/test/rusage/verbs/curtime.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/debug.c b/test/rusage/verbs/debug.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/debug.h b/test/rusage/verbs/debug.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/ibcomm.h b/test/rusage/verbs/ibcomm.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/list.c b/test/rusage/verbs/list.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/list.h b/test/rusage/verbs/list.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/makefile b/test/rusage/verbs/makefile old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mbuf.h b/test/rusage/verbs/mbuf.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mcons.h b/test/rusage/verbs/mcons.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mm_core.h b/test/rusage/verbs/mm_core.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mm_host.h b/test/rusage/verbs/mm_host.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mm_ib_test.h b/test/rusage/verbs/mm_ib_test.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mmib.h b/test/rusage/verbs/mmib.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/mtype.h b/test/rusage/verbs/mtype.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/pm_buf.h b/test/rusage/verbs/pm_buf.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/post.c b/test/rusage/verbs/post.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/printmem.c b/test/rusage/verbs/printmem.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/qp.c b/test/rusage/verbs/qp.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_imm_chain.c b/test/rusage/verbs/rdma_imm_chain.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_rd.c b/test/rusage/verbs/rdma_rd.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_rdv.c b/test/rusage/verbs/rdma_rdv.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_wr.c b/test/rusage/verbs/rdma_wr.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_wr_chain.c b/test/rusage/verbs/rdma_wr_chain.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/rdma_wr_with_imm_modify_qp.c b/test/rusage/verbs/rdma_wr_with_imm_modify_qp.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/read_config.c b/test/rusage/verbs/read_config.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/resource.c b/test/rusage/verbs/resource.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/send.c b/test/rusage/verbs/send.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/sock.c b/test/rusage/verbs/sock.c old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/sock.h b/test/rusage/verbs/sock.h old mode 100755 new mode 100644 diff --git a/test/rusage/verbs/ud.c b/test/rusage/verbs/ud.c old mode 100755 new mode 100644 diff --git a/test/user_space/patch_and_build.sh b/test/user_space/patch_and_build.sh index 908a124c..120a6612 100755 --- a/test/user_space/patch_and_build.sh +++ b/test/user_space/patch_and_build.sh @@ -1,6 +1,9 @@ #!/bin/sh -source ./config -MC_HOME=${SRC_PATH} +source ${HOME}/.mck_test_config + +TEST_DIR=`pwd` +MC_HOME=`pwd`/../.. + cd $MC_HOME if [ $# -eq 1 ]; then diff --git a/test/uti/mpi/001.c b/test/uti/mpi/001.c index 2584f3a0..024bf05c 100755 --- a/test/uti/mpi/001.c +++ b/test/uti/mpi/001.c @@ -11,6 +11,7 @@ #include #include /* For SYS_xxx definitions */ #include +#include "util.h" //#define DEBUG #ifdef DEBUG @@ -22,73 +23,14 @@ #define SZENTRY_DEFAULT (65536) /* Size of one slot */ #define NENTRY_DEFAULT 10000 /* Number of slots */ -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; +void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, + int src, int dest, MPI_Request *reqs, MPI_Status *status, + double usec) +{ int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, int src, int dest, MPI_Request* reqs, MPI_Status* status, double usec) { - int i; - if(rank == 1) { - for(i = 0; i < nentry; i++) { + if (rank == 1) { + for (i = 0; i < nentry; i++) { MPI_Isend(sendv[i], szentry, MPI_CHAR, dest, 0, MPI_COMM_WORLD, &reqs[i]); if (nentry > 10 && i % (nentry / 10) == 0) { printf("s"); fflush(stdout); @@ -97,7 +39,7 @@ void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, int MPI_Waitall(nentry, reqs, status); printf("w\n"); fflush(stdout); } else { - for(i = 0; i < nentry; i++) { + for (i = 0; i < nentry; i++) { MPI_Irecv(recvv[i], szentry, MPI_CHAR, src, 0, MPI_COMM_WORLD, &reqs[i]); if (nentry > 10 && i % (nentry / 10) == 0) { printf("r"); fflush(stdout); @@ -113,104 +55,133 @@ int main(int argc, char **argv) { int my_rank = -1, size = -1; int i, j; char **sendv, **recvv; - MPI_Status* status; - MPI_Request* reqs; - long szentry; - long nentry; + MPI_Status *status; + MPI_Request *reqs; + long szentry; + long nentry; int src, dest; - struct timespec start, end; + struct timespec start, end; double diffusec; - if(argc == 3) { - szentry = atoi(argv[1]); - nentry = atoi(argv[2]); - } else { - szentry = SZENTRY_DEFAULT; + if (argc == 3) { + szentry = atoi(argv[1]); + nentry = atoi(argv[2]); + } else { + szentry = SZENTRY_DEFAULT; nentry = NENTRY_DEFAULT; - } + } printf("szentry=%ld,nentry=%ld\n", szentry, nentry); - status = (MPI_Status*)malloc(sizeof(MPI_Status) * nentry); - reqs = (MPI_Request*)malloc(sizeof(MPI_Request) * nentry); + status = (MPI_Status *)malloc(sizeof(MPI_Status) * nentry); + reqs = (MPI_Request *)malloc(sizeof(MPI_Request) * nentry); - int actual; + int actual; - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); printf("Thread support level is %d\n", actual); - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &size); + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); - src = (size + my_rank - 1) % size; - dest = (my_rank + 1) % size; + src = (size + my_rank - 1) % size; + dest = (my_rank + 1) % size; - printf("rank=%d, size=%d, src=%d, dest=%d\n", my_rank, size, src, dest); + printf("rank=%d, size=%d, src=%d, dest=%d\n", my_rank, size, src, dest); sendv = malloc(sizeof(char *) * nentry); - if(!sendv) { printf("malloc failed"); goto fn_fail; } + if (!sendv) { + printf("malloc failed"); + goto fn_fail; + } for (i = 0; i < nentry; i++) { #if 0 int fd; fd = open("./file", O_RDWR); - if(fd == -1) { printf("open failed\n"); goto fn_fail; } - sendv[i] = (char*)mmap(0, szentry, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); + if (fd == -1) { + printf("open failed\n"); + goto fn_fail; + } + sendv[i] = (char *)mmap(0, szentry, PROT_READ | PROT_WRITE, + MAP_PRIVATE, fd, 0); #else - sendv[i] = (char*)mmap(0, szentry, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); + sendv[i] = (char *)mmap(0, szentry, PROT_READ | PROT_WRITE, + MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); #endif - if(sendv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } + if (sendv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } dprintf("[%d] sendv[%d]=%p\n", my_rank, i, sendv[i]); memset(sendv[i], 0xaa, szentry); } recvv = malloc(sizeof(char *) * nentry); - if(!recvv) { printf("malloc failed"); goto fn_fail; } + if (!recvv) { + printf("malloc failed"); + goto fn_fail; + } + for (i = 0; i < nentry; i++) { #if 0 int fd; fd = open("./file", O_RDWR); - if(fd == -1) { printf("open failed\n"); goto fn_fail; } - recvv[i] = (char*)mmap(0, szentry, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); + if (fd == -1) { + printf("open failed\n"); + goto fn_fail; + } + recvv[i] = (char *)mmap(0, szentry, PROT_READ|PROT_WRITE, + MAP_PRIVATE, fd, 0); #else - recvv[i] = (char*)mmap(0, szentry, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); + recvv[i] = (char *)mmap(0, szentry, PROT_READ|PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); #endif - if(recvv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } + if (recvv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } dprintf("[%d] recvv[%d]=%p\n", my_rank, i, recvv[i]); memset(recvv[i], 0, szentry); } printf("after memset\n"); - print_cpu_last_executed_on(); + print_cpu_last_executed_on("main"); for (i = 0; i < 1; i++) { MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { + if (my_rank == 0) { clock_gettime(CLOCK_REALTIME, &start); } - sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, status, 0); + sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, + reqs, status, 0); MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { + if (my_rank == 0) { clock_gettime(CLOCK_REALTIME, &end); diffusec = DIFFNSEC(end, start) / (double)1000; - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); } MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { + if (my_rank == 0) { clock_gettime(CLOCK_REALTIME, &start); } - sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, status, diffusec); + sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, + reqs, status, diffusec); MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { + if (my_rank == 0) { clock_gettime(CLOCK_REALTIME, &end); - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); } } fn_exit: - MPI_Finalize(); + MPI_Finalize(); return 0; fn_fail: - goto fn_exit; + goto fn_exit; } diff --git a/test/uti/mpi/002.c b/test/uti/mpi/002.c index 5a85014c..0b1197ba 100755 --- a/test/uti/mpi/002.c +++ b/test/uti/mpi/002.c @@ -1,127 +1,68 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define SZENTRY_DEFAULT (65536) /* Size of one slot */ -#define NENTRY_DEFAULT 10000 /* Number of slots */ - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -int main(int argc, char **argv) { - int my_rank = -1, size = -1; - int i, j; - struct timespec start, end; - - int actual; - - printf("nloop=%d\n", atoi(argv[1])); - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - printf("Thread support level is %d\n", actual); - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &size); - - print_cpu_last_executed_on(); - - printf("Before 1st barrier\n"); fflush(stdout); - MPI_Barrier(MPI_COMM_WORLD); - - printf("Before 2nd barrier\n"); fflush(stdout); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &start); - } - for (i = 0; i < atoi(argv[1]); i++) { - MPI_Barrier(MPI_COMM_WORLD); - } - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &end); - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); - } - - - fn_exit: - //MPI_Finalize(); - usleep(100000); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define SZENTRY_DEFAULT (65536) /* Size of one slot */ +#define NENTRY_DEFAULT 10000 /* Number of slots */ + +int main(int argc, char **argv) +{ + int my_rank = -1, size = -1; + int i, j; + + struct timespec start, end; + + int actual; + + printf("nloop=%d\n", atoi(argv[1])); + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + printf("Thread support level is %d\n", actual); + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + + print_cpu_last_executed_on("main"); + + printf("Before 1st barrier\n"); fflush(stdout); + MPI_Barrier(MPI_COMM_WORLD); + + printf("Before 2nd barrier\n"); fflush(stdout); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &start); + } + for (i = 0; i < atoi(argv[1]); i++) { + MPI_Barrier(MPI_COMM_WORLD); + } + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &end); + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); + } + + fn_exit: + //MPI_Finalize(); + usleep(100000); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/003.c b/test/uti/mpi/003.c index fa696ee2..3999de41 100755 --- a/test/uti/mpi/003.c +++ b/test/uti/mpi/003.c @@ -1,188 +1,151 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define SZENTRY_DEFAULT (65536) /* Size of one slot */ -#define NENTRY_DEFAULT 10000 /* Number of slots */ - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, int src, int dest, MPI_Request* reqs, MPI_Status* status, double usec) { - int i; - if(rank == 1) { - for(i = 0; i < nentry; i++) { - if (i % (nentry / 10) == 0) { - printf("s"); fflush(stdout); - } - MPI_Isend(sendv[0], szentry, MPI_CHAR, dest, 0, MPI_COMM_WORLD, &reqs[i]); - } - printf("\n"); fflush(stdout); - MPI_Waitall(nentry, reqs, status); - } else { - for(i = 0; i < nentry; i++) { - if (i % (nentry / 10) == 0) { - printf("r"); fflush(stdout); - } - MPI_Irecv(recvv[0], szentry, MPI_CHAR, src, 0, MPI_COMM_WORLD, &reqs[i]); - } - usleep(usec); - MPI_Waitall(nentry, reqs, status); - } -} - -int main(int argc, char **argv) { - int my_rank = -1, size = -1; - int i, j; - char **sendv, **recvv; - MPI_Status* status; - MPI_Request* reqs; - long szentry; - long nentry; - int src, dest; - struct timespec start, end; - double diffusec; - - if(argc == 3) { - szentry = atoi(argv[1]); - nentry = atoi(argv[2]); - } else { - szentry = SZENTRY_DEFAULT; - nentry = NENTRY_DEFAULT; - } - - status = (MPI_Status*)malloc(sizeof(MPI_Status) * nentry); - reqs = (MPI_Request*)malloc(sizeof(MPI_Request) * nentry); - - int actual; - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - printf("Thread support level is %d\n", actual); - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &size); - - src = (size + my_rank - 1) % size; - dest = (my_rank + 1) % size; - - printf("rank=%d, size=%d, src=%d, dest=%d\n", my_rank, size, src, dest); - - sendv = malloc(sizeof(char *) * nentry); - if(!sendv) { printf("malloc failed"); goto fn_fail; } - for (i = 0; i < 1; i++) { - sendv[i] = (char*)mmap(0, szentry, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - if(sendv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } - dprintf("[%d] sendv[%d]=%p\n", my_rank, i, sendv[i]); - memset(sendv[i], 0xaa, szentry); - } - - recvv = malloc(sizeof(char *) * nentry); - if(!recvv) { printf("malloc failed"); goto fn_fail; } - for (i = 0; i < 1; i++) { - recvv[i] = (char*)mmap(0, szentry, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); - if(recvv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } - dprintf("[%d] recvv[%d]=%p\n", my_rank, i, recvv[i]); - memset(recvv[i], 0, szentry); - } - - printf("after memset\n"); - - print_cpu_last_executed_on(); - - printf("Before 1st barrier\n"); fflush(stdout); - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &start); - } - sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, status, 0); - printf("Before 2nd barrier\n"); fflush(stdout); - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &end); - diffusec = DIFFNSEC(end, start) / (double)1000; - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); - } - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define SZENTRY_DEFAULT (65536) /* Size of one slot */ +#define NENTRY_DEFAULT 10000 /* Number of slots */ + +void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, + int src, int dest, MPI_Request *reqs, MPI_Status *status, + double usec) +{ + int i; + + if (rank == 1) { + for (i = 0; i < nentry; i++) { + if (i % (nentry / 10) == 0) { + printf("s"); fflush(stdout); + } + MPI_Isend(sendv[0], szentry, MPI_CHAR, dest, 0, + MPI_COMM_WORLD, &reqs[i]); + } + printf("\n"); fflush(stdout); + MPI_Waitall(nentry, reqs, status); + } else { + for (i = 0; i < nentry; i++) { + if (i % (nentry / 10) == 0) { + printf("r"); fflush(stdout); + } + MPI_Irecv(recvv[0], szentry, MPI_CHAR, src, 0, + MPI_COMM_WORLD, &reqs[i]); + } + usleep(usec); + MPI_Waitall(nentry, reqs, status); + } +} + +int main(int argc, char **argv) +{ + int my_rank = -1, size = -1; + int i, j; + char **sendv, **recvv; + MPI_Status *status; + MPI_Request *reqs; + long szentry; + long nentry; + int src, dest; + struct timespec start, end; + double diffusec; + + if (argc == 3) { + szentry = atoi(argv[1]); + nentry = atoi(argv[2]); + } else { + szentry = SZENTRY_DEFAULT; + nentry = NENTRY_DEFAULT; + } + + status = (MPI_Status *)malloc(sizeof(MPI_Status) * nentry); + reqs = (MPI_Request *)malloc(sizeof(MPI_Request) * nentry); + + int actual; + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + printf("Thread support level is %d\n", actual); + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + + src = (size + my_rank - 1) % size; + dest = (my_rank + 1) % size; + + printf("rank=%d, size=%d, src=%d, dest=%d\n", + my_rank, size, src, dest); + + sendv = malloc(sizeof(char *) * nentry); + if (!sendv) { + printf("malloc failed"); + goto fn_fail; + } + for (i = 0; i < 1; i++) { + sendv[i] = (char *)mmap(0, szentry, PROT_READ | PROT_WRITE, + MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); + if (sendv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } + dprintf("[%d] sendv[%d]=%p\n", my_rank, i, sendv[i]); + memset(sendv[i], 0xaa, szentry); + } + + recvv = malloc(sizeof(char *) * nentry); + if (!recvv) { + printf("malloc failed"); + goto fn_fail; + } + for (i = 0; i < 1; i++) { + recvv[i] = (char *)mmap(0, szentry, PROT_READ|PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); + if (recvv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } + dprintf("[%d] recvv[%d]=%p\n", my_rank, i, recvv[i]); + memset(recvv[i], 0, szentry); + } + + printf("after memset\n"); + + print_cpu_last_executed_on("main"); + + printf("Before 1st barrier\n"); fflush(stdout); + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &start); + } + sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, + status, 0); + printf("Before 2nd barrier\n"); fflush(stdout); + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &end); + diffusec = DIFFNSEC(end, start) / (double)1000; + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/004.c b/test/uti/mpi/004.c index bf92ca19..534a4285 100755 --- a/test/uti/mpi/004.c +++ b/test/uti/mpi/004.c @@ -1,281 +1,186 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* isend-calc-wait */ -void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, int ndoubles, MPI_Request* reqs, long calc_nsec) { - int i; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - r++; - req++; - MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - s++; - req++; - } - } - fwq(calc_nsec); - MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int actual; - int ppn = -1; - int nproc; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *sbuf, *rbuf; - MPI_Request* reqs; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: Thread support level is %d (it should be 3)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - reqs = (MPI_Request*)malloc(sizeof(MPI_Request) * nproc * 2); - if(!reqs) { printf("malloc failed"); goto fn_fail; } - - sbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!sbuf) { printf("malloc failed"); goto fn_fail; } - memset(sbuf, 0, sizeof(double) * ndoubles); - printf("tid=%d,pid=%d,sbuf=%p\n", syscall(__NR_gettid), getpid(), sbuf); - - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles); - printf("tid=%d,pid=%d,rbuf=%p\n", syscall(__NR_gettid), getpid(), rbuf); - - print_cpu_last_executed_on(); - - /* Measure isend-wait time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NSKIP 5 -#define NPURE 30 - for (i = 0; i < NPURE + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - } - my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, 0); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld usec\n", t_pure / 1000UL); - - /* Measure isend-calc-wait time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 30 - for (i = 0; i < NOVERALL + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - } - my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, t_pure); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_overall_l = DIFFNSEC(end, start) / NOVERALL; - //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld usec\n", t_overall / 1000UL); - if (my_rank == 0) { - long t_abs = (t_pure * 2) - t_overall; - printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); - } - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* isend-calc-wait */ +void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, + int ndoubles, MPI_Request *reqs, long calc_nsec) +{ + int i; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + r++; + req++; + MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + s++; + req++; + } + } + fwq(calc_nsec); + MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int actual; + int ppn = -1; + int nproc; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *sbuf, *rbuf; + MPI_Request *reqs; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: Thread support level is %d (it should be 3)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + reqs = (MPI_Request *)malloc(sizeof(MPI_Request) * nproc * 2); + if (!reqs) { + printf("malloc failed"); + goto fn_fail; + } + + sbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!sbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(sbuf, 0, sizeof(double) * ndoubles); + printf("tid=%d,pid=%d,sbuf=%p\n", syscall(__NR_gettid), getpid(), sbuf); + + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles); + printf("tid=%d,pid=%d,rbuf=%p\n", syscall(__NR_gettid), getpid(), rbuf); + + print_cpu_last_executed_on("main"); + + /* Measure isend-wait time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NSKIP 5 +#define NPURE 30 + for (i = 0; i < NPURE + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, 0); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld usec\n", t_pure / 1000UL); + + /* Measure isend-calc-wait time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 30 + for (i = 0; i < NOVERALL + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, + t_pure); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_overall_l = DIFFNSEC(end, start) / NOVERALL; + //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld usec\n", t_overall / 1000UL); + if (my_rank == 0) { + long t_abs = (t_pure * 2) - t_overall; + + printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/005.c b/test/uti/mpi/005.c index 0803ebb8..058aa7e7 100755 --- a/test/uti/mpi/005.c +++ b/test/uti/mpi/005.c @@ -1,338 +1,250 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -#if 1 -#define BEGIN_EPOCH(win) do { MPI_Win_fence(0, win); } while(0) -#define END_EPOCH(win) do { MPI_Win_fence(0, win); } while(0) -#define BAR_EPOCH do { } while(0) -#else -#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while(0) -#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while(0) -#define BAR_EPOCH do { MPI_Barrier(MPI_COMM_WORLD); } while(0) -#endif - - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - - if (delay_nsec < 0) { return; } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* fence-accumulate-calc-fence */ -void accumulate(int nproc, int ppn, int rank, double *wbuf, double *rbuf, int ndoubles, MPI_Win win, long calc_nsec) { - int i, j; - int r = 0, s = 0; - int req = 0; - BEGIN_EPOCH(win); - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - for (j = 0; j < ndoubles; j++) { - //printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", i, j, rbuf[i * ndoubles + j], wbuf[i * ndoubles + j]); - MPI_Accumulate(rbuf + i * ndoubles + j, 1, MPI_DOUBLE, i, i * ndoubles + j, 1, MPI_DOUBLE, MPI_SUM, win); - } - } - } - fwq(calc_nsec); - END_EPOCH(win); -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int rc; - int actual; - int ppn = -1; - int nproc; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *wbuf, *rbuf; - MPI_Win win; - struct timespec start, end; - long t_fence_l, t_pure_l, t_overall_l; - long t_fence, t_pure, t_overall; - int opt; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: MPI_THREAD_MULTIPLE not available (level was set to %d)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - /* write-to buffer */ - wbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!wbuf) { printf("malloc failed"); goto fn_fail; } - memset(wbuf, 0, sizeof(double) * ndoubles * nproc); - - /* read-from buffer */ - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles * nproc); - - if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { - printf("MPI_Win_create failed,rc=%d\n", rc); - } - - print_cpu_last_executed_on(); - - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - wbuf[i * ndoubles + j] = i + 1 + j; - rbuf[i * ndoubles + j] = (i + 1) * 2 + j; - } - } - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - } - } -#endif - /* Measure fence-fence time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NSKIP 5 -#define NFENCE 30 - for (i = 0; i < NFENCE + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - } - BEGIN_EPOCH(win); - END_EPOCH(win); - } - BAR_EPOCH; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_fence_l = DIFFNSEC(end, start) / NFENCE; - //printf("t_fence (local): %ld usec\n", t_fence_l / 1000UL); - MPI_Allreduce(&t_fence_l, &t_fence, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_fence (max): %ld usec\n", t_fence / 1000UL); - - /* Measure fence-acc-fence time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NPURE 30 - for (i = 0; i < NPURE + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -} - accumulate(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0); - } - BAR_EPOCH; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld usec\n", t_pure / 1000UL); - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - } - } -#endif - - /* Measure fenc-acc-calc-fence time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 30 - for (i = 0; i < NOVERALL + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -} - accumulate(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, t_pure - t_fence); - } - BAR_EPOCH; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_overall_l = DIFFNSEC(end, start) / NOVERALL; - //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld usec\n", t_overall / 1000UL); - if (my_rank == 0) { - long t_abs = (t_pure * 2) - t_overall; - printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); -} - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#if 1 +#define BEGIN_EPOCH(win) do { MPI_Win_fence(0, win); } while (0) +#define END_EPOCH(win) do { MPI_Win_fence(0, win); } while (0) +#define BAR_EPOCH do { } while (0) +#else +#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while (0) +#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while (0) +#define BAR_EPOCH do { MPI_Barrier(MPI_COMM_WORLD); } while (0) +#endif + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* fence-accumulate-calc-fence */ +void accumulate(int nproc, int ppn, int rank, double *wbuf, double *rbuf, + int ndoubles, MPI_Win win, long calc_nsec) +{ + int i, j; + int r = 0, s = 0; + int req = 0; + + BEGIN_EPOCH(win); + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + for (j = 0; j < ndoubles; j++) { +#if 0 + printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", + i, j, rbuf[i * ndoubles + j], + wbuf[i * ndoubles + j]); +#endif + MPI_Accumulate(rbuf + i * ndoubles + j, 1, + MPI_DOUBLE, i, i * ndoubles + j, + 1, MPI_DOUBLE, MPI_SUM, win); + } + } + } + fwq(calc_nsec); + END_EPOCH(win); +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int rc; + int actual; + int ppn = -1; + int nproc; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *wbuf, *rbuf; + MPI_Win win; + struct timespec start, end; + long t_fence_l, t_pure_l, t_overall_l; + long t_fence, t_pure, t_overall; + int opt; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: MPI_THREAD_MULTIPLE not available " + "(level was set to %d)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + /* write-to buffer */ + wbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!wbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(wbuf, 0, sizeof(double) * ndoubles * nproc); + + /* read-from buffer */ + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles * nproc); + + if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, + sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, + &win)) { + printf("MPI_Win_create failed,rc=%d\n", rc); + } + + print_cpu_last_executed_on("main"); + + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + wbuf[i * ndoubles + j] = i + 1 + j; + rbuf[i * ndoubles + j] = (i + 1) * 2 + j; + } + } + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + } + } +#endif + /* Measure fence-fence time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NSKIP 5 +#define NFENCE 30 + for (i = 0; i < NFENCE + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + BEGIN_EPOCH(win); + END_EPOCH(win); + } + BAR_EPOCH; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_fence_l = DIFFNSEC(end, start) / NFENCE; + //printf("t_fence (local): %ld usec\n", t_fence_l / 1000UL); + MPI_Allreduce(&t_fence_l, &t_fence, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_fence (max): %ld usec\n", t_fence / 1000UL); + + /* Measure fence-acc-fence time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NPURE 30 + for (i = 0; i < NPURE + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + accumulate(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0); + } + BAR_EPOCH; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld usec\n", t_pure / 1000UL); + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + } + } +#endif + + /* Measure fenc-acc-calc-fence time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 30 + for (i = 0; i < NOVERALL + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + accumulate(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, + t_pure - t_fence); + } + BAR_EPOCH; + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_overall_l = DIFFNSEC(end, start) / NOVERALL; + //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld usec\n", t_overall / 1000UL); + if (my_rank == 0) { + long t_abs = (t_pure * 2) - t_overall; + + printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/006.c b/test/uti/mpi/006.c index d7aa6e61..b72c84de 100755 --- a/test/uti/mpi/006.c +++ b/test/uti/mpi/006.c @@ -1,625 +1,555 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include - -#include /* required for core PSM2 functions */ -#include /* required for PSM2 MQ functions (send, recv, etc) */ - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define BUFFER_LENGTH 8000000 -#define CONNECT_ARRAY_SIZE 8 -void die(char *msg, int rc) { - fprintf(stderr, "%s: %d\n", msg, rc); -} - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* isend-calc-wait */ -void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, int ndoubles, MPI_Request* reqs, long calc_nsec) { - int i; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - r++; - req++; - MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - s++; - req++; - } - } - fwq(calc_nsec); - MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); -} - - -/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ -psm2_epid_t find_server(int rank) { - FILE *fp = NULL; - psm2_epid_t server_epid = 0; - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - printf("PSM2 client waiting for epid mapping file to appear...\n"); - while (!fp) { - sleep(1); - fp = fopen(fn, "r"); - } - fscanf(fp, "%lx", &server_epid); - fclose(fp); - printf("PSM2 client found server epid = 0x%lx\n", server_epid); - return server_epid; -} - -void write_epid_to_file(int rank, psm2_epid_t myepid) { - FILE *fp; - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - fp = fopen(fn, "w"); - if (!fp) { - fprintf(stderr, - "Exiting, couldn't write server's epid mapping file: "); - die(strerror(errno), errno); - } - fprintf(fp, "0x%lx", myepid); - fclose(fp); - printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); - return; -} - -int psm2_sendrecv(int rank, int sender, int receiver) { - struct psm2_ep_open_opts o; - psm2_uuid_t uuid; /* 16 byte */ - psm2_ep_t myep; - psm2_epid_t myepid; - psm2_epid_t server_epid; - psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; - int epid_array_mask[CONNECT_ARRAY_SIZE]; - psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; - psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; - int rc; - int ver_major = PSM2_VERNO_MAJOR; - int ver_minor = PSM2_VERNO_MINOR; - char msgbuf[BUFFER_LENGTH]; - psm2_mq_t q; - psm2_mq_req_t req_mq; - memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ - *((int *)&uuid) = rand(); -/* Try to initialize PSM2 with the requested library version. - * * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR - * * as defined in the PSM2 headers, ensure that we are linking with - * * the same version of PSM2 as we compiled against. */ - - if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { - die("couldn't init", rc); - return -1; - } - printf("PSM2 init done.\n"); - /* Setup the endpoint options struct */ - if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { - die("couldn't set default opts", rc); - return -1; - } - printf("PSM2 opts_get_defaults done.\n"); - /* Attempt to open a PSM2 endpoint. This allocates hardware resources. */ - if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { - die("couldn't psm2_ep_open()", rc); - return -1; - } - printf("PSM2 endpoint open done.\n"); - int is_server = (rank == receiver) ? 1 : 0; - if (is_server) { - write_epid_to_file(rank, myepid); - } else { - server_epid = find_server(receiver); - } - if (is_server) { - /* Server does nothing here. A connection does not have to be - * * established to receive messages. */ - printf("PSM2 server up.\n"); - } else { - /* Setup connection request info */ - /* PSM2 can connect to a single epid per request, - * * or an arbitrary number of epids in a single connect call. - * * For this example, use part of an array of - * * connection requests. */ - memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); - epid_array[0] = server_epid; - epid_array_mask[0] = 1; - /* Begin the connection process. - * * note that if a requested epid is not responding, - * * the connect call will still return OK. - * * The errors array will contain the state of individual - * * connection requests. */ - if ((rc = psm2_ep_connect(myep, - CONNECT_ARRAY_SIZE, - epid_array, - epid_array_mask, - epid_connect_errors, - epaddr_array, - 0 /* no timeout */ - )) != PSM2_OK) { - die("couldn't ep_connect", rc); - return -1; - } - printf("PSM2 connect request processed.\n"); - /* Now check if our connection to the server is ready */ - if (epid_connect_errors[0] != PSM2_OK) { - die("couldn't connect to server", - epid_connect_errors[0]); - return -1; - } - printf("PSM2 client-server connection established.\n"); - } - /* Setup our PSM2 message queue */ - if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) - != PSM2_OK) { - die("couldn't initialize PSM2 MQ", rc); - return -1; - } - printf("PSM2 MQ init done.\n"); - if (is_server) { - psm2_mq_tag_t t = {0xABCD}; - psm2_mq_tag_t tm = {-1}; - /* Post the receive request */ - if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, - &t, /* message tag */ - &tm, /* message tag mask */ - 0, /* no flags */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_irecv()", rc); - return -1; - } - printf("PSM2 MQ irecv() posted\n"); - /* Wait until the message arrives */ - if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { - die("couldn't wait for the irecv", rc); - return -1; - } - printf("PSM2 MQ wait() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - unlink("psm2-demo-server-epid"); - } else { - /* Say hello */ - snprintf(msgbuf, BUFFER_LENGTH, - "Hello world from epid=0x%lx, pid=%d.\n", - myepid, getpid()); - psm2_mq_tag_t t = {0xABCD}; - if ((rc = psm2_mq_send2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - return -1; - } - printf("PSM2 MQ send() done.\n"); - } -/* Close down the MQ */ - if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { - die("couldn't psm2_mq_finalize()", rc); - return -1; - } - printf("PSM2 MQ finalized.\n"); -/* Close our ep, releasing all hardware resources. - * * Try to close all connections properly */ - if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, - 0 /* no timeout */)) != PSM2_OK) { - die("couldn't psm2_ep_close()", rc); - return -1; - } - printf("PSM2 ep closed.\n"); - /* Release all local PSM2 resources */ - if ((rc = psm2_finalize()) != PSM2_OK) { - die("couldn't psm2_finalize()", rc); - return -1; - } - printf("PSM2 shut down, exiting.\n"); - return 0; -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -struct thr_arg { - volatile int bar_count; /* Barrier before entering loop */ - pthread_mutex_t bar_lock; - pthread_cond_t bar_cond; - pthread_t pthread; - int rank; - int ppn; - int nproc; -}; - -struct thr_arg thr_arg; - -void *progress_fn(void *arg) { - struct thr_arg *thr_arg = (struct thr_arg *)arg; - int rc; - int i; - - rc = syscall(732); - if (rc == -1) - fprintf(stdout, "CT09100 progress_fn running on Linux OK\n"); - else { - fprintf(stdout, "CT09100 progress_fn running on McKernel NG (%d)\n", rc); - } - - printf("progress,enter\n"); - - /* barrier */ - pthread_mutex_lock(&thr_arg->bar_lock); - thr_arg->bar_count++; - if (thr_arg->bar_count == 2) { - if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg->bar_count != 2) { - if ((rc = pthread_cond_wait(&thr_arg->bar_cond, &thr_arg->bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg->bar_lock); - -#if 0 - printf("progress,after barrier\n"); - for (i = 0; i < thr_arg->nproc; i++) { - if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { - if (thr_arg->rank < i) { - psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); - } else { - psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); - } - } - } -#endif - - /* barrier */ - pthread_mutex_lock(&thr_arg->bar_lock); - thr_arg->bar_count--; - if (thr_arg->bar_count == 0) { - if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg->bar_count != 0) { - if ((rc = pthread_cond_wait(&thr_arg->bar_cond, &thr_arg->bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg->bar_lock); - - - printf("progress,exit\n"); - return NULL; -} - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int ppn = -1; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *sbuf, *rbuf; - MPI_Request* reqs; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - pthread_condattr_t condattr; - pthread_mutexattr_t mutexattr; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: Thread support level is %d (it should be 3)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - /* Spawn a thread */ - thr_arg.rank = my_rank; - thr_arg.ppn = ppn; - thr_arg.nproc = nproc; - thr_arg.bar_count = 0; - - pthread_condattr_init(&condattr); - pthread_cond_init(&thr_arg.bar_cond, &condattr); - - pthread_mutexattr_init(&mutexattr); - pthread_mutex_init(&thr_arg.bar_lock, &mutexattr); - - char *uti_str = getenv("DISABLE_UTI"); - int uti_val = uti_str ? atoi(uti_str) : 0; - if (!uti_val) { - rc = syscall(731, 1, NULL); - if (rc) { - fprintf(stdout, "CT09003 INFO: uti not available (rc=%d)\n", rc); - } else { - fprintf(stdout, "CT09003 INFO: uti available\n"); - } - } else { - fprintf(stdout, "CT09003 INFO: uti disabled\n"); - } - - rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); - if (rc){ - fprintf(stdout, "pthread_create: %d\n", rc); - exit(1); - } - - /* barrier */ - pthread_mutex_lock(&thr_arg.bar_lock); - thr_arg.bar_count++; - if (thr_arg.bar_count == 2) { - if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg.bar_count != 2) { - if ((rc = pthread_cond_wait(&thr_arg.bar_cond, &thr_arg.bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg.bar_lock); - - printf("parent,after barrier\n"); - - - reqs = (MPI_Request*)malloc(sizeof(MPI_Request) * nproc * 2); - if(!reqs) { printf("malloc failed"); goto fn_fail; } - - sbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!sbuf) { printf("malloc failed"); goto fn_fail; } - memset(sbuf, 0, sizeof(double) * ndoubles); - printf("tid=%d,pid=%d,sbuf=%p\n", syscall(__NR_gettid), getpid(), sbuf); - - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles); - printf("tid=%d,pid=%d,rbuf=%p\n", syscall(__NR_gettid), getpid(), rbuf); - - print_cpu_last_executed_on(); - - /* Measure isend-wait time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NSKIP 5 -#define NPURE 30 - for (i = 0; i < NPURE + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - } - my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, 0); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld usec\n", t_pure / 1000UL); - - /* Measure isend-calc-wait time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 30 - for (i = 0; i < NOVERALL + NSKIP; i++) { - if (i == NSKIP) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - } - my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, t_pure); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_overall_l = DIFFNSEC(end, start) / NOVERALL; - //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld usec\n", t_overall / 1000UL); - if (my_rank == 0) { - long t_abs = (t_pure * 2) - t_overall; - printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); - } - - /* barrier */ - pthread_mutex_lock(&thr_arg.bar_lock); - thr_arg.bar_count--; - if (thr_arg.bar_count == 0) { - if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg.bar_count != 0) { - if ((rc = pthread_cond_wait(&thr_arg.bar_cond, &thr_arg.bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg.bar_lock); - - - pthread_join(thr_arg.pthread, NULL); - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include /* required for core PSM2 functions */ +#include /* required for PSM2 MQ functions (send, recv, etc) */ +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BUFFER_LENGTH 8000000 +#define CONNECT_ARRAY_SIZE 8 +void die(char *msg, int rc) +{ + fprintf(stderr, "%s: %d\n", msg, rc); +} + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* isend-calc-wait */ +void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, + int ndoubles, MPI_Request *reqs, long calc_nsec) +{ + int i; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + r++; + req++; + MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + s++; + req++; + } + } + fwq(calc_nsec); + MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); +} + + +/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ +psm2_epid_t find_server(int rank) +{ + FILE *fp = NULL; + psm2_epid_t server_epid = 0; + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + printf("PSM2 client waiting for epid mapping file to appear...\n"); + while (!fp) { + sleep(1); + fp = fopen(fn, "r"); + } + fscanf(fp, "%lx", &server_epid); + fclose(fp); + printf("PSM2 client found server epid = 0x%lx\n", server_epid); + return server_epid; +} + +void write_epid_to_file(int rank, psm2_epid_t myepid) +{ + FILE *fp; + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + fp = fopen(fn, "w"); + if (!fp) { + fprintf(stderr, + "Exiting, couldn't write server's epid mapping file: "); + die(strerror(errno), errno); + } + fprintf(fp, "0x%lx", myepid); + fclose(fp); + printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); +} + +int psm2_sendrecv(int rank, int sender, int receiver) +{ + struct psm2_ep_open_opts o; + psm2_uuid_t uuid; /* 16 byte */ + psm2_ep_t myep; + psm2_epid_t myepid; + psm2_epid_t server_epid; + psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; + int epid_array_mask[CONNECT_ARRAY_SIZE]; + psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; + psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; + int rc; + int ver_major = PSM2_VERNO_MAJOR; + int ver_minor = PSM2_VERNO_MINOR; + char msgbuf[BUFFER_LENGTH]; + psm2_mq_t q; + psm2_mq_req_t req_mq; + + memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ + *((int *)&uuid) = rand(); + /* Try to initialize PSM2 with the requested library version. + * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR + * as defined in the PSM2 headers, ensure that we are linking with + * the same version of PSM2 as we compiled against. + */ + + if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { + die("couldn't init", rc); + return -1; + } + printf("PSM2 init done.\n"); + /* Setup the endpoint options struct */ + if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { + die("couldn't set default opts", rc); + return -1; + } + printf("PSM2 opts_get_defaults done.\n"); + /* Attempt to open a PSM2 endpoint. This allocates hardware resources. + */ + if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { + die("couldn't psm2_ep_open()", rc); + return -1; + } + printf("PSM2 endpoint open done.\n"); + int is_server = (rank == receiver) ? 1 : 0; + + if (is_server) { + write_epid_to_file(rank, myepid); + } else { + server_epid = find_server(receiver); + } + if (is_server) { + /* Server does nothing here. A connection does not have to be + * established to receive messages. + */ + printf("PSM2 server up.\n"); + } else { + /* Setup connection request info. + * PSM2 can connect to a single epid per request, + * or an arbitrary number of epids in a single connect call. + * For this example, use part of an array of + * connection requests. + */ + memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); + epid_array[0] = server_epid; + epid_array_mask[0] = 1; + /* Begin the connection process. + * note that if a requested epid is not responding, + * the connect call will still return OK. + * The errors array will contain the state of individual + * connection requests. + */ + if ((rc = psm2_ep_connect(myep, + CONNECT_ARRAY_SIZE, + epid_array, + epid_array_mask, + epid_connect_errors, + epaddr_array, + 0 /* no timeout */ + )) != PSM2_OK) { + die("couldn't ep_connect", rc); + return -1; + } + printf("PSM2 connect request processed.\n"); + /* Now check if our connection to the server is ready */ + if (epid_connect_errors[0] != PSM2_OK) { + die("couldn't connect to server", + epid_connect_errors[0]); + return -1; + } + printf("PSM2 client-server connection established.\n"); + } + /* Setup our PSM2 message queue */ + if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) + != PSM2_OK) { + die("couldn't initialize PSM2 MQ", rc); + return -1; + } + printf("PSM2 MQ init done.\n"); + if (is_server) { + psm2_mq_tag_t t = {0xABCD}; + psm2_mq_tag_t tm = {-1}; + + /* Post the receive request */ + if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, + &t, /* message tag */ + &tm, /* message tag mask */ + 0, /* no flags */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_irecv()", rc); + return -1; + } + printf("PSM2 MQ irecv() posted\n"); + /* Wait until the message arrives */ + if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { + die("couldn't wait for the irecv", rc); + return -1; + } + printf("PSM2 MQ wait() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + unlink("psm2-demo-server-epid"); + } else { + /* Say hello */ + snprintf(msgbuf, BUFFER_LENGTH, + "Hello world from epid=0x%lx, pid=%d.\n", + myepid, getpid()); + psm2_mq_tag_t t = {0xABCD}; + + if ((rc = psm2_mq_send2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + return -1; + } + printf("PSM2 MQ send() done.\n"); + } + /* Close down the MQ */ + if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { + die("couldn't psm2_mq_finalize()", rc); + return -1; + } + printf("PSM2 MQ finalized.\n"); + /* Close our ep, releasing all hardware resources. + * Try to close all connections properly + */ + if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, + 0 /* no timeout */)) != PSM2_OK) { + die("couldn't psm2_ep_close()", rc); + return -1; + } + printf("PSM2 ep closed.\n"); + /* Release all local PSM2 resources */ + if ((rc = psm2_finalize()) != PSM2_OK) { + die("couldn't psm2_finalize()", rc); + return -1; + } + printf("PSM2 shut down, exiting.\n"); + return 0; +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +struct thr_arg { + volatile int bar_count; /* Barrier before entering loop */ + pthread_mutex_t bar_lock; + pthread_cond_t bar_cond; + pthread_t pthread; + int rank; + int ppn; + int nproc; +}; + +struct thr_arg thr_arg; + +void *progress_fn(void *arg) +{ + struct thr_arg *thr_arg = (struct thr_arg *)arg; + int rc; + int i; + + rc = syscall(732); + if (rc == -1) + fprintf(stdout, "CT09100 %s running on Linux OK\n", + __func__); + else { + fprintf(stdout, + "CT09100 %s running on McKernel NG (%d)\n", + __func__, rc); + } + + printf("progress,enter\n"); + + /* barrier */ + pthread_mutex_lock(&thr_arg->bar_lock); + thr_arg->bar_count++; + if (thr_arg->bar_count == 2) { + if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg->bar_count != 2) { + if ((rc = pthread_cond_wait(&thr_arg->bar_cond, + &thr_arg->bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg->bar_lock); + +#if 0 + printf("progress,after barrier\n"); + for (i = 0; i < thr_arg->nproc; i++) { + if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { + if (thr_arg->rank < i) { + psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); + } else { + psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); + } + } + } +#endif + + /* barrier */ + pthread_mutex_lock(&thr_arg->bar_lock); + thr_arg->bar_count--; + if (thr_arg->bar_count == 0) { + if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg->bar_count != 0) { + if ((rc = pthread_cond_wait(&thr_arg->bar_cond, + &thr_arg->bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg->bar_lock); + + + printf("progress,exit\n"); + return NULL; +} + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int ppn = -1; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *sbuf, *rbuf; + MPI_Request *reqs; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + pthread_condattr_t condattr; + pthread_mutexattr_t mutexattr; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: Thread support level is %d (it should be 3)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + /* Spawn a thread */ + thr_arg.rank = my_rank; + thr_arg.ppn = ppn; + thr_arg.nproc = nproc; + thr_arg.bar_count = 0; + + pthread_condattr_init(&condattr); + pthread_cond_init(&thr_arg.bar_cond, &condattr); + + pthread_mutexattr_init(&mutexattr); + pthread_mutex_init(&thr_arg.bar_lock, &mutexattr); + + char *uti_str = getenv("DISABLE_UTI"); + int uti_val = uti_str ? atoi(uti_str) : 0; + + if (!uti_val) { + rc = syscall(731, 1, NULL); + if (rc) { + fprintf(stdout, + "CT09003 INFO: uti not available (rc=%d)\n", + rc); + } else { + fprintf(stdout, "CT09003 INFO: uti available\n"); + } + } else { + fprintf(stdout, "CT09003 INFO: uti disabled\n"); + } + + rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); + if (rc) { + fprintf(stdout, "pthread_create: %d\n", rc); + exit(1); + } + + /* barrier */ + pthread_mutex_lock(&thr_arg.bar_lock); + thr_arg.bar_count++; + if (thr_arg.bar_count == 2) { + if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg.bar_count != 2) { + if ((rc = pthread_cond_wait(&thr_arg.bar_cond, + &thr_arg.bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg.bar_lock); + + printf("parent,after barrier\n"); + + + reqs = (MPI_Request *)malloc(sizeof(MPI_Request) * nproc * 2); + if (!reqs) { + printf("malloc failed"); + goto fn_fail; + } + + sbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!sbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(sbuf, 0, sizeof(double) * ndoubles); + printf("tid=%d,pid=%d,sbuf=%p\n", syscall(__NR_gettid), getpid(), sbuf); + + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles); + printf("tid=%d,pid=%d,rbuf=%p\n", syscall(__NR_gettid), getpid(), rbuf); + + print_cpu_last_executed_on("main"); + + /* Measure isend-wait time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NSKIP 5 +#define NPURE 30 + for (i = 0; i < NPURE + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, 0); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld usec\n", t_pure / 1000UL); + + /* Measure isend-calc-wait time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 30 + for (i = 0; i < NOVERALL + NSKIP; i++) { + if (i == NSKIP) { + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + } + my_send(nproc, ppn, my_rank, sbuf, rbuf, ndoubles, reqs, + t_pure); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_overall_l = DIFFNSEC(end, start) / NOVERALL; + //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld usec\n", t_overall / 1000UL); + if (my_rank == 0) { + long t_abs = (t_pure * 2) - t_overall; + + printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); + } + + /* barrier */ + pthread_mutex_lock(&thr_arg.bar_lock); + thr_arg.bar_count--; + if (thr_arg.bar_count == 0) { + if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg.bar_count != 0) { + if ((rc = pthread_cond_wait(&thr_arg.bar_cond, + &thr_arg.bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg.bar_lock); + + + pthread_join(thr_arg.pthread, NULL); + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/007.c b/test/uti/mpi/007.c index af31c581..007451d1 100755 --- a/test/uti/mpi/007.c +++ b/test/uti/mpi/007.c @@ -1,563 +1,478 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include - -#include /* required for core PSM2 functions */ -#include /* required for PSM2 MQ functions (send, recv, etc) */ - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define BUFFER_LENGTH 8000000 -#define CONNECT_ARRAY_SIZE 8 -void die(char *msg, int rc) { - fprintf(stderr, "%s: %d\n", msg, rc); - exit(1); -} - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* isend-calc-wait */ -void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, int ndoubles, MPI_Request* reqs, long calc_nsec) { - int i; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - r++; - req++; - MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - s++; - req++; - } - } - fwq(calc_nsec); - MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); -} - - -/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ -psm2_epid_t find_server(int rank) { - FILE *fp = NULL; - psm2_epid_t server_epid = 0; - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - printf("PSM2 client waiting for epid mapping file to appear...\n"); - while (!fp) { - sleep(1); - fp = fopen(fn, "r"); - } - fscanf(fp, "%lx", &server_epid); - fclose(fp); - printf("PSM2 client found server epid = 0x%lx\n", server_epid); - return server_epid; -} - -void write_epid_to_file(int rank, psm2_epid_t myepid) { - FILE *fp; - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - fp = fopen(fn, "w"); - if (!fp) { - fprintf(stderr, - "Exiting, couldn't write server's epid mapping file: "); - die(strerror(errno), errno); - } - fprintf(fp, "0x%lx", myepid); - fclose(fp); - printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); - return; -} - -int psm2_sendrecv(int rank, int sender, int receiver) { - struct psm2_ep_open_opts o; - psm2_uuid_t uuid; - psm2_ep_t myep; - psm2_epid_t myepid; - psm2_epid_t server_epid; - psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; - int epid_array_mask[CONNECT_ARRAY_SIZE]; - psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; - psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; - int rc; - int ver_major = PSM2_VERNO_MAJOR; - int ver_minor = PSM2_VERNO_MINOR; - char msgbuf[BUFFER_LENGTH]; - psm2_mq_t q; - psm2_mq_req_t req_mq; - memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ -/* Try to initialize PSM2 with the requested library version. - * * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR - * * as defined in the PSM2 headers, ensure that we are linking with - * * the same version of PSM2 as we compiled against. */ - - if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { - die("couldn't init", rc); - } - printf("PSM2 init done.\n"); - /* Setup the endpoint options struct */ - if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { - die("couldn't set default opts", rc); - } - printf("PSM2 opts_get_defaults done.\n"); - /* Attempt to open a PSM2 endpoint. This allocates hardware resources. */ - if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { - die("couldn't psm2_ep_open()", rc); - } - printf("PSM2 endpoint open done.\n"); - int is_server = (rank == receiver) ? 1 : 0; - if (is_server) { - write_epid_to_file(rank, myepid); - } else { - server_epid = find_server(receiver); - } - if (is_server) { - /* Server does nothing here. A connection does not have to be - * * established to receive messages. */ - printf("PSM2 server up.\n"); - } else { - /* Setup connection request info */ - /* PSM2 can connect to a single epid per request, - * * or an arbitrary number of epids in a single connect call. - * * For this example, use part of an array of - * * connection requests. */ - memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); - epid_array[0] = server_epid; - epid_array_mask[0] = 1; - /* Begin the connection process. - * * note that if a requested epid is not responding, - * * the connect call will still return OK. - * * The errors array will contain the state of individual - * * connection requests. */ - if ((rc = psm2_ep_connect(myep, - CONNECT_ARRAY_SIZE, - epid_array, - epid_array_mask, - epid_connect_errors, - epaddr_array, - 0 /* no timeout */ - )) != PSM2_OK) { - die("couldn't ep_connect", rc); - } - printf("PSM2 connect request processed.\n"); - /* Now check if our connection to the server is ready */ - if (epid_connect_errors[0] != PSM2_OK) { - die("couldn't connect to server", - epid_connect_errors[0]); - } - printf("PSM2 client-server connection established.\n"); - } - /* Setup our PSM2 message queue */ - if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) - != PSM2_OK) { - die("couldn't initialize PSM2 MQ", rc); - } - printf("PSM2 MQ init done.\n"); - if (is_server) { - psm2_mq_tag_t t = {0xABCD}; - psm2_mq_tag_t tm = {-1}; - /* Post the receive request */ - if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, - &t, /* message tag */ - &tm, /* message tag mask */ - 0, /* no flags */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_irecv()", rc); - } - printf("PSM2 MQ irecv() posted\n"); - /* Wait until the message arrives */ - if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { - die("couldn't wait for the irecv", rc); - } - printf("PSM2 MQ wait() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - unlink("psm2-demo-server-epid"); - } else { - /* Say hello */ - snprintf(msgbuf, BUFFER_LENGTH, - "Hello world from epid=0x%lx, pid=%d.\n", - myepid, getpid()); - psm2_mq_tag_t t = {0xABCD}; - if ((rc = psm2_mq_send2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - } - printf("PSM2 MQ send() done.\n"); - } -/* Close down the MQ */ - if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { - die("couldn't psm2_mq_finalize()", rc); - } - printf("PSM2 MQ finalized.\n"); -/* Close our ep, releasing all hardware resources. - * * Try to close all connections properly */ - if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, - 0 /* no timeout */)) != PSM2_OK) { - die("couldn't psm2_ep_close()", rc); - } - printf("PSM2 ep closed.\n"); - /* Release all local PSM2 resources */ - if ((rc = psm2_finalize()) != PSM2_OK) { - die("couldn't psm2_finalize()", rc); - } - printf("PSM2 shut down, exiting.\n"); - return 0; -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -struct thr_arg { - volatile int bar_count; /* Barrier before entering loop */ - pthread_mutex_t bar_lock; - pthread_cond_t bar_cond; - pthread_t pthread; - int rank; - int ppn; - int nproc; -}; - -struct thr_arg thr_arg; - -void *progress_fn(void *arg) { - struct thr_arg *thr_arg = (struct thr_arg *)arg; - int rc; - int i; - - rc = syscall(732); - if (rc == -1) - fprintf(stdout, "CT09100 progress_fn running on Linux OK\n"); - else { - fprintf(stdout, "CT09100 progress_fn running on McKernel NG (%d)\n", rc); - } - - printf("progress,enter\n"); - - /* barrier */ - pthread_mutex_lock(&thr_arg->bar_lock); - thr_arg->bar_count++; - if (thr_arg->bar_count == 2) { - if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg->bar_count != 2) { - if ((rc = pthread_cond_wait(&thr_arg->bar_cond, &thr_arg->bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg->bar_lock); - - printf("progress,after barrier\n"); -#if 1 - for (i = 0; i < thr_arg->nproc; i++) { - if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { - if (thr_arg->rank < i) { - psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); - } else { - psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); - } - } - } -#endif - - /* barrier */ - pthread_mutex_lock(&thr_arg->bar_lock); - thr_arg->bar_count--; - if (thr_arg->bar_count == 0) { - if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg->bar_count != 0) { - if ((rc = pthread_cond_wait(&thr_arg->bar_cond, &thr_arg->bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg->bar_lock); - - - printf("progress,exit\n"); - return NULL; -} - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int ppn = -1; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *sbuf, *rbuf; - MPI_Request* reqs; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - pthread_condattr_t condattr; - pthread_mutexattr_t mutexattr; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - char *rank_str = getenv("PMI_RANK"); - if (!rank_str) { - printf("getenv failed\n"); - exit(1); - } - my_rank = atoi(rank_str); - nproc = 2; - - if (my_rank == 0) { - printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - /* Spawn a thread */ - thr_arg.rank = my_rank; - thr_arg.ppn = ppn; - thr_arg.nproc = nproc; - thr_arg.bar_count = 0; - - pthread_condattr_init(&condattr); - pthread_cond_init(&thr_arg.bar_cond, &condattr); - - pthread_mutexattr_init(&mutexattr); - pthread_mutex_init(&thr_arg.bar_lock, &mutexattr); - - char *uti_str = getenv("DISABLE_UTI"); - int uti_val = uti_str ? atoi(uti_str) : 0; - if (!uti_val) { - rc = syscall(731, 1, NULL); - if (rc) { - fprintf(stdout, "CT09003 INFO: uti not available (rc=%d)\n", rc); - } else { - fprintf(stdout, "CT09003 INFO: uti available\n"); - } - } else { - fprintf(stdout, "CT09003 INFO: uti disabled\n"); - } - - rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); - if (rc){ - fprintf(stdout, "pthread_create: %d\n", rc); - exit(1); - } - - /* barrier */ - pthread_mutex_lock(&thr_arg.bar_lock); - thr_arg.bar_count++; - if (thr_arg.bar_count == 2) { - if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg.bar_count != 2) { - if ((rc = pthread_cond_wait(&thr_arg.bar_cond, &thr_arg.bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg.bar_lock); - - printf("parent,after barrier\n"); - - - print_cpu_last_executed_on(); - - /* barrier */ - pthread_mutex_lock(&thr_arg.bar_lock); - thr_arg.bar_count--; - if (thr_arg.bar_count == 0) { - if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { - printf("pthread_cond_broadcast failed,rc=%d\n", rc); - } - } - while (thr_arg.bar_count != 0) { - if ((rc = pthread_cond_wait(&thr_arg.bar_cond, &thr_arg.bar_lock))) { - printf("pthread_cond_wait failed,rc=%d\n", rc); - } - } - pthread_mutex_unlock(&thr_arg.bar_lock); - - - pthread_join(thr_arg.pthread, NULL); - - fn_exit: - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include /* required for core PSM2 functions */ +#include /* required for PSM2 MQ functions (send, recv, etc) */ +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BUFFER_LENGTH 8000000 +#define CONNECT_ARRAY_SIZE 8 +void die(char *msg, int rc) +{ + fprintf(stderr, "%s: %d\n", msg, rc); + exit(1); +} + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* isend-calc-wait */ +void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, + int ndoubles, MPI_Request *reqs, long calc_nsec) +{ + int i; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + r++; + req++; + MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + s++; + req++; + } + } + fwq(calc_nsec); + MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); +} + + +/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ +psm2_epid_t find_server(int rank) +{ + FILE *fp = NULL; + psm2_epid_t server_epid = 0; + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + printf("PSM2 client waiting for epid mapping file to appear...\n"); + while (!fp) { + sleep(1); + fp = fopen(fn, "r"); + } + fscanf(fp, "%lx", &server_epid); + fclose(fp); + printf("PSM2 client found server epid = 0x%lx\n", server_epid); + return server_epid; +} + +void write_epid_to_file(int rank, psm2_epid_t myepid) +{ + FILE *fp; + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + fp = fopen(fn, "w"); + if (!fp) { + fprintf(stderr, + "Exiting, couldn't write server's epid mapping file: "); + die(strerror(errno), errno); + } + fprintf(fp, "0x%lx", myepid); + fclose(fp); + printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); +} + +int psm2_sendrecv(int rank, int sender, int receiver) +{ + struct psm2_ep_open_opts o; + psm2_uuid_t uuid; + psm2_ep_t myep; + psm2_epid_t myepid; + psm2_epid_t server_epid; + psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; + int epid_array_mask[CONNECT_ARRAY_SIZE]; + psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; + psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; + int rc; + int ver_major = PSM2_VERNO_MAJOR; + int ver_minor = PSM2_VERNO_MINOR; + char msgbuf[BUFFER_LENGTH]; + psm2_mq_t q; + psm2_mq_req_t req_mq; + + memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ + /* Try to initialize PSM2 with the requested library version. + * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR + * as defined in the PSM2 headers, ensure that we are linking with + * the same version of PSM2 as we compiled against. + */ + + if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { + die("couldn't init", rc); + } + printf("PSM2 init done.\n"); + /* Setup the endpoint options struct */ + if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { + die("couldn't set default opts", rc); + } + printf("PSM2 opts_get_defaults done.\n"); + /* Attempt to open a PSM2 endpoint. This allocates hardware resources. + */ + if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { + die("couldn't psm2_ep_open()", rc); + } + printf("PSM2 endpoint open done.\n"); + int is_server = (rank == receiver) ? 1 : 0; + + if (is_server) { + write_epid_to_file(rank, myepid); + } else { + server_epid = find_server(receiver); + } + if (is_server) { + /* Server does nothing here. A connection does not have to be + * established to receive messages. + */ + printf("PSM2 server up.\n"); + } else { + /* Setup connection request info. + * PSM2 can connect to a single epid per request, + * or an arbitrary number of epids in a single connect call. + * For this example, use part of an array of + * connection requests. + */ + memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); + epid_array[0] = server_epid; + epid_array_mask[0] = 1; + /* Begin the connection process. + * note that if a requested epid is not responding, + * the connect call will still return OK. + * The errors array will contain the state of individual + * connection requests. + */ + if ((rc = psm2_ep_connect(myep, + CONNECT_ARRAY_SIZE, + epid_array, + epid_array_mask, + epid_connect_errors, + epaddr_array, + 0 /* no timeout */ + )) != PSM2_OK) { + die("couldn't ep_connect", rc); + } + printf("PSM2 connect request processed.\n"); + /* Now check if our connection to the server is ready */ + if (epid_connect_errors[0] != PSM2_OK) { + die("couldn't connect to server", + epid_connect_errors[0]); + } + printf("PSM2 client-server connection established.\n"); + } + /* Setup our PSM2 message queue */ + if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) + != PSM2_OK) { + die("couldn't initialize PSM2 MQ", rc); + } + printf("PSM2 MQ init done.\n"); + if (is_server) { + psm2_mq_tag_t t = {0xABCD}; + psm2_mq_tag_t tm = {-1}; + /* Post the receive request */ + if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, + &t, /* message tag */ + &tm, /* message tag mask */ + 0, /* no flags */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_irecv()", rc); + } + printf("PSM2 MQ irecv() posted\n"); + /* Wait until the message arrives */ + if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { + die("couldn't wait for the irecv", rc); + } + printf("PSM2 MQ wait() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + unlink("psm2-demo-server-epid"); + } else { + /* Say hello */ + snprintf(msgbuf, BUFFER_LENGTH, + "Hello world from epid=0x%lx, pid=%d.\n", + myepid, getpid()); + psm2_mq_tag_t t = {0xABCD}; + + if ((rc = psm2_mq_send2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + } + printf("PSM2 MQ send() done.\n"); + } + /* Close down the MQ */ + if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { + die("couldn't psm2_mq_finalize()", rc); + } + printf("PSM2 MQ finalized.\n"); + /* Close our ep, releasing all hardware resources. + * Try to close all connections properly + */ + if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, + 0 /* no timeout */)) != PSM2_OK) { + die("couldn't psm2_ep_close()", rc); + } + printf("PSM2 ep closed.\n"); + /* Release all local PSM2 resources */ + if ((rc = psm2_finalize()) != PSM2_OK) { + die("couldn't psm2_finalize()", rc); + } + printf("PSM2 shut down, exiting.\n"); + return 0; +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +struct thr_arg { + volatile int bar_count; /* Barrier before entering loop */ + pthread_mutex_t bar_lock; + pthread_cond_t bar_cond; + pthread_t pthread; + int rank; + int ppn; + int nproc; +}; + +struct thr_arg thr_arg; + +void *progress_fn(void *arg) +{ + struct thr_arg *thr_arg = (struct thr_arg *)arg; + int rc; + int i; + + rc = syscall(732); + if (rc == -1) + fprintf(stdout, "CT09100 %s running on Linux OK\n", + __func__); + else { + fprintf(stdout, + "CT09100 %s running on McKernel NG (%d)\n", + __func__, rc); + } + + printf("progress,enter\n"); + + /* barrier */ + pthread_mutex_lock(&thr_arg->bar_lock); + thr_arg->bar_count++; + if (thr_arg->bar_count == 2) { + if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg->bar_count != 2) { + if ((rc = pthread_cond_wait(&thr_arg->bar_cond, + &thr_arg->bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg->bar_lock); + + printf("progress,after barrier\n"); +#if 1 + for (i = 0; i < thr_arg->nproc; i++) { + if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { + if (thr_arg->rank < i) { + psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); + } else { + psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); + } + } + } +#endif + + /* barrier */ + pthread_mutex_lock(&thr_arg->bar_lock); + thr_arg->bar_count--; + if (thr_arg->bar_count == 0) { + if ((rc = pthread_cond_broadcast(&thr_arg->bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg->bar_count != 0) { + if ((rc = pthread_cond_wait(&thr_arg->bar_cond, + &thr_arg->bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg->bar_lock); + + + printf("progress,exit\n"); + return NULL; +} + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int ppn = -1; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *sbuf, *rbuf; + MPI_Request *reqs; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + pthread_condattr_t condattr; + pthread_mutexattr_t mutexattr; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + char *rank_str = getenv("PMI_RANK"); + + if (!rank_str) { + printf("getenv failed\n"); + exit(1); + } + my_rank = atoi(rank_str); + nproc = 2; + + if (my_rank == 0) { + printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + /* Spawn a thread */ + thr_arg.rank = my_rank; + thr_arg.ppn = ppn; + thr_arg.nproc = nproc; + thr_arg.bar_count = 0; + + pthread_condattr_init(&condattr); + pthread_cond_init(&thr_arg.bar_cond, &condattr); + + pthread_mutexattr_init(&mutexattr); + pthread_mutex_init(&thr_arg.bar_lock, &mutexattr); + + char *uti_str = getenv("DISABLE_UTI"); + int uti_val = uti_str ? atoi(uti_str) : 0; + + if (!uti_val) { + rc = syscall(731, 1, NULL); + if (rc) { + fprintf(stdout, + "CT09003 INFO: uti not available (rc=%d)\n", + rc); + } else { + fprintf(stdout, "CT09003 INFO: uti available\n"); + } + } else { + fprintf(stdout, "CT09003 INFO: uti disabled\n"); + } + + rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); + if (rc) { + fprintf(stdout, "pthread_create: %d\n", rc); + exit(1); + } + + /* barrier */ + pthread_mutex_lock(&thr_arg.bar_lock); + thr_arg.bar_count++; + if (thr_arg.bar_count == 2) { + if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg.bar_count != 2) { + if ((rc = pthread_cond_wait(&thr_arg.bar_cond, + &thr_arg.bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg.bar_lock); + + printf("parent,after barrier\n"); + + + print_cpu_last_executed_on("main"); + + /* barrier */ + pthread_mutex_lock(&thr_arg.bar_lock); + thr_arg.bar_count--; + if (thr_arg.bar_count == 0) { + if ((rc = pthread_cond_broadcast(&thr_arg.bar_cond))) { + printf("pthread_cond_broadcast failed,rc=%d\n", rc); + } + } + while (thr_arg.bar_count != 0) { + if ((rc = pthread_cond_wait(&thr_arg.bar_cond, + &thr_arg.bar_lock))) { + printf("pthread_cond_wait failed,rc=%d\n", rc); + } + } + pthread_mutex_unlock(&thr_arg.bar_lock); + + + pthread_join(thr_arg.pthread, NULL); + + fn_exit: + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/008.c b/test/uti/mpi/008.c index 6db6e3ae..10e9cf27 100755 --- a/test/uti/mpi/008.c +++ b/test/uti/mpi/008.c @@ -1,589 +1,515 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include - -#include /* required for core PSM2 functions */ -#include /* required for PSM2 MQ functions (send, recv, etc) */ - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define BUFFER_LENGTH /*8000000*/(1ULL<<12) -#define CONNECT_ARRAY_SIZE 8 -void die(char *msg, int rc) { - fprintf(stderr, "%s: %d\n", msg, rc); - fflush(stderr); -} - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ -psm2_epid_t find_server(int rank) { - FILE *fp = NULL; - psm2_epid_t server_epid = 0; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); fflush(stdout); - - sprintf(fn, "psm2-demo-server-epid-%d", rank); - printf("PSM2 client waiting for epid mapping file to appear...\n"); fflush(stdout); - while (!fp) { - usleep(250*1000); - fp = fopen(fn, "r"); - } - fscanf(fp, "%lx", &server_epid); - fclose(fp); - printf("PSM2 client found server epid = 0x%lx\n", server_epid); - return server_epid; -} - -void write_epid_to_file(int rank, psm2_epid_t myepid) { - FILE *fp; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); - sprintf(fn, "psm2-demo-server-epid-%d", rank); - fp = fopen(fn, "w"); - if (!fp) { - fprintf(stderr, - "Exiting, couldn't write server's epid mapping file: "); - die(strerror(errno), errno); - } - fprintf(fp, "0x%lx", myepid); - fclose(fp); - printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); - return; -} - -psm2_uuid_t uuid; -psm2_ep_t myep; -psm2_epid_t myepid; -psm2_epid_t server_epid; -psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; -int epid_array_mask[CONNECT_ARRAY_SIZE]; -psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; -psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; - -int my_psm2_init(int my_rank, int server_rank) { - struct psm2_ep_open_opts o; - int rc; - int ver_major = PSM2_VERNO_MAJOR; - int ver_minor = PSM2_VERNO_MINOR; - memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ -/* Try to initialize PSM2 with the requested library version. - * * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR - * * as defined in the PSM2 headers, ensure that we are linking with - * * the same version of PSM2 as we compiled against. */ - - if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { - die("couldn't init", rc); - } - printf("PSM2 init done.\n"); - /* Setup the endpoint options struct */ - if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { - die("couldn't set default opts", rc); - } - printf("PSM2 opts_get_defaults done.\n"); - /* Attempt to open a PSM2 endpoint. This allocates hardware resources. */ - if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { - die("couldn't psm2_ep_open()", rc); - } - printf("PSM2 endpoint open done.\n"); - - return 0; -} - -psm2_mq_t q; - -int my_psm2_connect(int my_rank, int server_rank) { - int rc; - int is_server = (my_rank == server_rank) ? 1 : 0; - printf("%s: enter\n", __FUNCTION__); fflush(stdout); - if (is_server) { - write_epid_to_file(my_rank, myepid); - } else { - server_epid = find_server(server_rank); - } - printf("%s: epid exchange done\n", __FUNCTION__); fflush(stdout); - if (is_server) { - /* Server does nothing here. A connection does not have to be - * * established to receive messages. */ - printf("PSM2 server up.\n"); - } else { - /* Setup connection request info */ - /* PSM2 can connect to a single epid per request, - * * or an arbitrary number of epids in a single connect call. - * * For this example, use part of an array of - * * connection requests. */ - memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); - epid_array[0] = server_epid; - epid_array_mask[0] = 1; - /* Begin the connection process. - * * note that if a requested epid is not responding, - * * the connect call will still return OK. - * * The errors array will contain the state of individual - * * connection requests. */ - printf("calling ep_connect\n"); - int count = 0; - while ((rc = psm2_ep_connect(myep, - CONNECT_ARRAY_SIZE, - epid_array, - epid_array_mask, - epid_connect_errors, - epaddr_array, - 1 /* 0.5 sec timeout */ - )) != PSM2_OK) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 500*1000*1000 }; - nanosleep(&ts, NULL); - printf("."); fflush(stdout); - count++; - if (count > 30) { - break; - } - } - - if (rc != PSM2_OK) { - printf("psm2_ep_connect timed-out\n"); - return -1; - } - - printf("PSM2 connect request processed.\n"); - /* Now check if our connection to the server is ready */ - if (epid_connect_errors[0] != PSM2_OK) { - die("couldn't connect to server", epid_connect_errors[0]); - return -1; - } - printf("PSM2 client-server connection established.\n"); - } - - /* Setup our PSM2 message queue */ - if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) - != PSM2_OK) { - die("couldn't initialize PSM2 MQ", rc); - } - printf("PSM2 MQ init done.\n"); - - return 0; -} -char msgbuf[BUFFER_LENGTH]; - -int my_psm2_sendrecv(int rank, int sender, int receiver) { - int is_server = (rank == receiver) ? 1 : 0; - int rc; - psm2_mq_req_t req_mq; - //char msgbuf[BUFFER_LENGTH]; - - register long rsp asm ("rsp"); - printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); fflush(stdout); - - memset(msgbuf, 0, BUFFER_LENGTH); - - if (is_server) { - psm2_mq_tag_t t = {0xABCD}; - psm2_mq_tag_t tm = {-1}; - /* Post the receive request */ - if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, - &t, /* message tag */ - &tm, /* message tag mask */ - 0, /* no flags */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_irecv()", rc); - } - printf("PSM2 MQ irecv() posted\n"); - -#if 0 - /* Wait until the message arrives */ - if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { - die("couldn't wait for the irecv", rc); - } - printf("PSM2 MQ wait() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - - if (is_server) { - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - unlink(fn); - } -#else - int count = 0; - while ((rc = psm2_mq_ipeek(q, &req_mq, NULL)) != PSM2_OK) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 500*1000*1000 }; - nanosleep(&ts, NULL); - printf("."); fflush(stdout); - count++; - if (count > 2) { - break; - } - } - if (rc == PSM2_OK) { - if ((rc = psm2_mq_test(&req_mq, NULL)) != PSM2_OK) { - printf("psm2_mq_test failed\n"); - } else { - printf("PSM2 MQ test() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - } - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - unlink(fn); - } else { - printf("PSM2 MQ test() timed-out.\n"); - } -#endif - } else { - /* Say hello */ - snprintf(msgbuf, BUFFER_LENGTH, - "Hello world from epid=0x%lx, pid=%d.\n", - myepid, getpid()); - psm2_mq_tag_t t = {0xABCD}; -#if 0 - if ((rc = psm2_mq_send2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - } - printf("PSM2 MQ send() done.\n"); -#else - if ((rc = psm2_mq_isend2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - } - printf("PSM2 MQ isend() posted\n"); - - int count = 0; - while ((rc = psm2_mq_ipeek2(q, &req_mq, NULL)) != PSM2_OK) { - struct timespec ts = { .tv_sec = 0, .tv_nsec = 500*1000*1000 }; - nanosleep(&ts, NULL); - printf("."); fflush(stdout); - count++; - if (count > 30) { - break; - } - } - if (rc == PSM2_OK) { - if ((rc = psm2_mq_test2(&req_mq, NULL)) != PSM2_OK) { - printf("PSM2 MQ test() failed.\n"); - } else { - printf("PSM2 MQ test() done.\n"); - } - } else { - printf("PSM2 MQ test() timeout.\n"); - } -#endif - } -/* Close down the MQ */ - if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { - die("couldn't psm2_mq_finalize()", rc); - } - printf("PSM2 MQ finalized.\n"); -/* Close our ep, releasing all hardware resources. - * * Try to close all connections properly */ - if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, - 0 /* no timeout */)) != PSM2_OK) { - die("couldn't psm2_ep_close()", rc); - } - printf("PSM2 ep closed.\n"); - /* Release all local PSM2 resources */ - if ((rc = psm2_finalize()) != PSM2_OK) { - die("couldn't psm2_finalize()", rc); - } - printf("PSM2 shut down, exiting.\n"); - return 0; -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -struct thr_arg { - pthread_barrier_t bar; - pthread_t pthread; - int rank; - int ppn; - int nproc; -}; - -struct thr_arg thr_arg; - -void *progress_fn(void *arg) { - struct thr_arg *thr_arg = (struct thr_arg *)arg; - int rc; - int i; - - rc = syscall(732); - if (rc == -1) - fprintf(stdout, "CT09100 progress_fn running on Linux OK\n"); - else { - fprintf(stdout, "CT09100 progress_fn running on McKernel NG (%d)\n", rc); - } - - printf("progress,enter\n"); - - pthread_barrier_wait(&thr_arg->bar); - -#if 1 - for (i = 0; i < thr_arg->nproc; i++) { - if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { - if (thr_arg->rank < i) { - my_psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); - } else { - my_psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); - } - } - } -#endif - - pthread_barrier_wait(&thr_arg->bar); - - -#if 0 - printf("progress,entering infinite loop\n"); - while(1) { } -#endif - printf("progress,returning\n"); - return NULL; -} - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int ppn = -1; - int my_rank = -1, size = -1; - int i, j; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - pthread_barrierattr_t barrierattr; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+P:", options, NULL)) != -1) { - switch (opt) { - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ppn == -1) { - printf("specify ppn with --ppn"); - exit(1); - } - - char *rank_str = getenv("PMI_RANK"); - if (!rank_str) { - printf("getenv failed\n"); - exit(1); - } - my_rank = atoi(rank_str); - printf("my_rank=%d\n", my_rank); fflush(stdout); - - nproc = 2; - - if (my_rank == 0) { - printf("tid=%d,pid=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - int server_rank = ppn + (my_rank % ppn); - my_psm2_init(my_rank, server_rank); - my_psm2_connect(my_rank, server_rank); - - /* Spawn a thread */ - thr_arg.rank = my_rank; - thr_arg.ppn = ppn; - thr_arg.nproc = nproc; - - pthread_barrierattr_init(&barrierattr); - pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); - - char *uti_str = getenv("DISABLE_UTI"); - int uti_val = uti_str ? atoi(uti_str) : 0; - if (!uti_val) { - rc = syscall(731, 1, NULL); - if (rc) { - fprintf(stdout, "CT09003 INFO: uti not available (rc=%d)\n", rc); - } else { - fprintf(stdout, "CT09003 INFO: uti available\n"); - } - } else { - fprintf(stdout, "CT09003 INFO: uti disabled\n"); - } - - rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); - if (rc){ - fprintf(stdout, "pthread_create: %d\n", rc); - exit(1); - } - - pthread_barrier_wait(&thr_arg.bar); - - pthread_barrier_wait(&thr_arg.bar); - - pthread_join(thr_arg.pthread, NULL); - - fn_exit: - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include /* required for core PSM2 functions */ +#include /* required for PSM2 MQ functions (send, recv, etc) */ +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BUFFER_LENGTH /*8000000*/(1ULL<<12) +#define CONNECT_ARRAY_SIZE 8 +void die(char *msg, int rc) +{ + fprintf(stderr, "%s: %d\n", msg, rc); + fflush(stderr); +} + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ +psm2_epid_t find_server(int rank) +{ + FILE *fp = NULL; + psm2_epid_t server_epid = 0; + char fn[256]; + + printf("%s: enter\n", __func__); fflush(stdout); + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + printf("PSM2 client waiting for epid mapping file to appear...\n"); + fflush(stdout); + while (!fp) { + usleep(250*1000); + fp = fopen(fn, "r"); + } + fscanf(fp, "%lx", &server_epid); + fclose(fp); + printf("PSM2 client found server epid = 0x%lx\n", server_epid); + return server_epid; +} + +void write_epid_to_file(int rank, psm2_epid_t myepid) +{ + FILE *fp; + char fn[256]; + + printf("%s: enter\n", __func__); + sprintf(fn, "psm2-demo-server-epid-%d", rank); + fp = fopen(fn, "w"); + if (!fp) { + fprintf(stderr, + "Exiting, couldn't write server's epid mapping file: "); + die(strerror(errno), errno); + } + fprintf(fp, "0x%lx", myepid); + fclose(fp); + printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); +} + +psm2_uuid_t uuid; +psm2_ep_t myep; +psm2_epid_t myepid; +psm2_epid_t server_epid; +psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; +int epid_array_mask[CONNECT_ARRAY_SIZE]; +psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; +psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; + +int my_psm2_init(int my_rank, int server_rank) +{ + struct psm2_ep_open_opts o; + int rc; + int ver_major = PSM2_VERNO_MAJOR; + int ver_minor = PSM2_VERNO_MINOR; + + memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ + /* Try to initialize PSM2 with the requested library version. + * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR + * as defined in the PSM2 headers, ensure that we are linking with + * the same version of PSM2 as we compiled against. + */ + + if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { + die("couldn't init", rc); + } + printf("PSM2 init done.\n"); + /* Setup the endpoint options struct */ + if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { + die("couldn't set default opts", rc); + } + printf("PSM2 opts_get_defaults done.\n"); + /* Attempt to open a PSM2 endpoint. This allocates hardware resources. + */ + if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { + die("couldn't psm2_ep_open()", rc); + } + printf("PSM2 endpoint open done.\n"); + + return 0; +} + +psm2_mq_t q; + +int my_psm2_connect(int my_rank, int server_rank) +{ + int rc; + int is_server = (my_rank == server_rank) ? 1 : 0; + + printf("%s: enter\n", __func__); fflush(stdout); + if (is_server) { + write_epid_to_file(my_rank, myepid); + } else { + server_epid = find_server(server_rank); + } + printf("%s: epid exchange done\n", __func__); fflush(stdout); + if (is_server) { + /* Server does nothing here. A connection does not have to be + * established to receive messages. + */ + printf("PSM2 server up.\n"); + } else { + /* Setup connection request info. + * PSM2 can connect to a single epid per request, + * or an arbitrary number of epids in a single connect call. + * For this example, use part of an array of + * connection requests. + */ + memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); + epid_array[0] = server_epid; + epid_array_mask[0] = 1; + /* Begin the connection process. + * note that if a requested epid is not responding, + * the connect call will still return OK. + * The errors array will contain the state of individual + * connection requests. + */ + printf("calling ep_connect\n"); + int count = 0; + + while ((rc = psm2_ep_connect(myep, + CONNECT_ARRAY_SIZE, + epid_array, + epid_array_mask, + epid_connect_errors, + epaddr_array, + 1 /* 0.5 sec timeout */ + )) != PSM2_OK) { + struct timespec ts = { + .tv_sec = 0, .tv_nsec = 500*1000*1000 + }; + + nanosleep(&ts, NULL); + printf("."); fflush(stdout); + count++; + if (count > 30) { + break; + } + } + + if (rc != PSM2_OK) { + printf("psm2_ep_connect timed-out\n"); + return -1; + } + + printf("PSM2 connect request processed.\n"); + /* Now check if our connection to the server is ready */ + if (epid_connect_errors[0] != PSM2_OK) { + die("couldn't connect to server", + epid_connect_errors[0]); + return -1; + } + printf("PSM2 client-server connection established.\n"); + } + + /* Setup our PSM2 message queue */ + if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) + != PSM2_OK) { + die("couldn't initialize PSM2 MQ", rc); + } + printf("PSM2 MQ init done.\n"); + + return 0; +} +char msgbuf[BUFFER_LENGTH]; + +int my_psm2_sendrecv(int rank, int sender, int receiver) +{ + int is_server = (rank == receiver) ? 1 : 0; + int rc; + psm2_mq_req_t req_mq; + //char msgbuf[BUFFER_LENGTH]; + + register long rsp asm ("rsp"); + printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); fflush(stdout); + + memset(msgbuf, 0, BUFFER_LENGTH); + + if (is_server) { + psm2_mq_tag_t t = {0xABCD}; + psm2_mq_tag_t tm = {-1}; + /* Post the receive request */ + if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, + &t, /* message tag */ + &tm, /* message tag mask */ + 0, /* no flags */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_irecv()", rc); + } + printf("PSM2 MQ irecv() posted\n"); + +#if 0 + /* Wait until the message arrives */ + if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { + die("couldn't wait for the irecv", rc); + } + printf("PSM2 MQ wait() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + + if (is_server) { + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + unlink(fn); + } +#else + int count = 0; + + while ((rc = psm2_mq_ipeek(q, &req_mq, NULL)) != PSM2_OK) { + struct timespec ts = { + .tv_sec = 0, .tv_nsec = 500*1000*1000 + }; + + nanosleep(&ts, NULL); + printf("."); fflush(stdout); + count++; + if (count > 2) { + break; + } + } + if (rc == PSM2_OK) { + if ((rc = psm2_mq_test(&req_mq, NULL)) != PSM2_OK) { + printf("psm2_mq_test failed\n"); + } else { + printf("PSM2 MQ test() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + } + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + unlink(fn); + } else { + printf("PSM2 MQ test() timed-out.\n"); + } +#endif + } else { + /* Say hello */ + snprintf(msgbuf, BUFFER_LENGTH, + "Hello world from epid=0x%lx, pid=%d.\n", + myepid, getpid()); + psm2_mq_tag_t t = {0xABCD}; +#if 0 + if ((rc = psm2_mq_send2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + } + printf("PSM2 MQ send() done.\n"); +#else + if ((rc = psm2_mq_isend2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + } + printf("PSM2 MQ isend() posted\n"); + + int count = 0; + + while ((rc = psm2_mq_ipeek2(q, &req_mq, NULL)) != PSM2_OK) { + struct timespec ts = { + .tv_sec = 0, .tv_nsec = 500*1000*1000 + }; + + nanosleep(&ts, NULL); + printf("."); fflush(stdout); + count++; + if (count > 30) { + break; + } + } + if (rc == PSM2_OK) { + if ((rc = psm2_mq_test2(&req_mq, NULL)) != PSM2_OK) { + printf("PSM2 MQ test() failed.\n"); + } else { + printf("PSM2 MQ test() done.\n"); + } + } else { + printf("PSM2 MQ test() timeout.\n"); + } +#endif + } + /* Close down the MQ */ + if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { + die("couldn't psm2_mq_finalize()", rc); + } + printf("PSM2 MQ finalized.\n"); + /* Close our ep, releasing all hardware resources. + * Try to close all connections properly + */ + if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, + 0 /* no timeout */)) != PSM2_OK) { + die("couldn't psm2_ep_close()", rc); + } + printf("PSM2 ep closed.\n"); + /* Release all local PSM2 resources */ + if ((rc = psm2_finalize()) != PSM2_OK) { + die("couldn't psm2_finalize()", rc); + } + printf("PSM2 shut down, exiting.\n"); + return 0; +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +struct thr_arg { + pthread_barrier_t bar; + pthread_t pthread; + int rank; + int ppn; + int nproc; +}; + +struct thr_arg thr_arg; + +void *progress_fn(void *arg) +{ + struct thr_arg *thr_arg = (struct thr_arg *)arg; + int rc; + int i; + + rc = syscall(732); + if (rc == -1) + fprintf(stdout, "CT09100 %s running on Linux OK\n", + __func__); + else { + fprintf(stdout, "CT09100 %s running on McKernel NG (%d)\n", + __func__, rc); + } + + printf("progress,enter\n"); + + pthread_barrier_wait(&thr_arg->bar); + +#if 1 + for (i = 0; i < thr_arg->nproc; i++) { + if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { + if (thr_arg->rank < i) { + my_psm2_sendrecv(thr_arg->rank, thr_arg->rank, + i); + } else { + my_psm2_sendrecv(thr_arg->rank, i, + thr_arg->rank); + } + } + } +#endif + + pthread_barrier_wait(&thr_arg->bar); + + +#if 0 + printf("progress,entering infinite loop\n"); + while (1) + ; +#endif + printf("progress,returning\n"); + return NULL; +} + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int ppn = -1; + int my_rank = -1, size = -1; + int i, j; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + pthread_barrierattr_t barrierattr; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+P:", options, NULL)) != -1) { + switch (opt) { + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ppn == -1) { + printf("specify ppn with --ppn"); + exit(1); + } + + char *rank_str = getenv("PMI_RANK"); + + if (!rank_str) { + printf("getenv failed\n"); + exit(1); + } + my_rank = atoi(rank_str); + printf("my_rank=%d\n", my_rank); fflush(stdout); + + nproc = 2; + + if (my_rank == 0) { + printf("tid=%d,pid=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + int server_rank = ppn + (my_rank % ppn); + + my_psm2_init(my_rank, server_rank); + my_psm2_connect(my_rank, server_rank); + + /* Spawn a thread */ + thr_arg.rank = my_rank; + thr_arg.ppn = ppn; + thr_arg.nproc = nproc; + + pthread_barrierattr_init(&barrierattr); + pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); + + char *uti_str = getenv("DISABLE_UTI"); + int uti_val = uti_str ? atoi(uti_str) : 0; + + if (!uti_val) { + rc = syscall(731, 1, NULL); + if (rc) { + fprintf(stdout, + "CT09003 INFO: uti not available (rc=%d)\n", + rc); + } else { + fprintf(stdout, "CT09003 INFO: uti available\n"); + } + } else { + fprintf(stdout, "CT09003 INFO: uti disabled\n"); + } + + rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); + if (rc) { + fprintf(stdout, "pthread_create: %d\n", rc); + exit(1); + } + + pthread_barrier_wait(&thr_arg.bar); + + pthread_barrier_wait(&thr_arg.bar); + + pthread_join(thr_arg.pthread, NULL); + + fn_exit: + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/009.c b/test/uti/mpi/009.c index 3a1209a5..ce603d3e 100755 --- a/test/uti/mpi/009.c +++ b/test/uti/mpi/009.c @@ -1,537 +1,459 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include - -#include /* required for core PSM2 functions */ -#include /* required for PSM2 MQ functions (send, recv, etc) */ - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define BUFFER_LENGTH /*8000000*/(1ULL<<12) -#define CONNECT_ARRAY_SIZE 8 -void die(char *msg, int rc) { - fprintf(stderr, "%s: %d\n", msg, rc); - fflush(stderr); -} - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* isend-calc-wait */ -void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, int ndoubles, MPI_Request* reqs, long calc_nsec) { - int i; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - r++; - req++; - MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, i, 0, MPI_COMM_WORLD, &reqs[req]); - s++; - req++; - } - } - fwq(calc_nsec); - MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); -} - - -/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ -psm2_epid_t find_server(int rank) { - FILE *fp = NULL; - psm2_epid_t server_epid = 0; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); fflush(stdout); - - sprintf(fn, "psm2-demo-server-epid-%d", rank); - printf("PSM2 client waiting for epid mapping file to appear...\n"); fflush(stdout); - while (!fp) { - sleep(1); - fp = fopen(fn, "r"); - } - fscanf(fp, "%lx", &server_epid); - fclose(fp); - printf("PSM2 client found server epid = 0x%lx\n", server_epid); - return server_epid; -} - -void write_epid_to_file(int rank, psm2_epid_t myepid) { - FILE *fp; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); - sprintf(fn, "psm2-demo-server-epid-%d", rank); - fp = fopen(fn, "w"); - if (!fp) { - fprintf(stderr, - "Exiting, couldn't write server's epid mapping file: "); - die(strerror(errno), errno); - } - fprintf(fp, "0x%lx", myepid); - fclose(fp); - printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); - return; -} - -psm2_uuid_t uuid; -psm2_ep_t myep; -psm2_epid_t myepid; -psm2_epid_t server_epid; -psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; -int epid_array_mask[CONNECT_ARRAY_SIZE]; -psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; -psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; - -int my_psm2_init(int my_rank, int server_rank) { - struct psm2_ep_open_opts o; - int rc; - int ver_major = PSM2_VERNO_MAJOR; - int ver_minor = PSM2_VERNO_MINOR; - - printf("%s: my_rank=%d,server_rank=%d\n", __FUNCTION__, my_rank, server_rank); fflush(stdout); - memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ -/* Try to initialize PSM2 with the requested library version. - * * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR - * * as defined in the PSM2 headers, ensure that we are linking with - * * the same version of PSM2 as we compiled against. */ - - if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { - die("couldn't init", rc); - } - printf("PSM2 init done.\n"); - /* Setup the endpoint options struct */ - if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { - die("couldn't set default opts", rc); - } - printf("PSM2 opts_get_defaults done.\n"); - /* Attempt to open a PSM2 endpoint. This allocates hardware resources. */ - if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { - die("couldn't psm2_ep_open()", rc); - } - printf("PSM2 endpoint open done.\n"); - - return 0; -} -int my_psm2_connect(int my_rank, int server_rank) { - int rc; - int is_server = (my_rank == server_rank) ? 1 : 0; - printf("%s: my_rank=%d,server_rank=%d\n", __FUNCTION__, my_rank, server_rank); fflush(stdout); - if (is_server) { - write_epid_to_file(my_rank, myepid); - } else { - server_epid = find_server(server_rank); - } - printf("%s: epid exchange done\n", __FUNCTION__); fflush(stdout); - if (is_server) { - /* Server does nothing here. A connection does not have to be - * * established to receive messages. */ - printf("PSM2 server up.\n"); - } else { - /* Setup connection request info */ - /* PSM2 can connect to a single epid per request, - * * or an arbitrary number of epids in a single connect call. - * * For this example, use part of an array of - * * connection requests. */ - memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); - epid_array[0] = server_epid; - epid_array_mask[0] = 1; - /* Begin the connection process. - * * note that if a requested epid is not responding, - * * the connect call will still return OK. - * * The errors array will contain the state of individual - * * connection requests. */ - if ((rc = psm2_ep_connect(myep, - CONNECT_ARRAY_SIZE, - epid_array, - epid_array_mask, - epid_connect_errors, - epaddr_array, - 0 /* no timeout */ - )) != PSM2_OK) { - die("couldn't ep_connect", rc); - return -1; - } - printf("PSM2 connect request processed.\n"); - /* Now check if our connection to the server is ready */ - if (epid_connect_errors[0] != PSM2_OK) { - die("couldn't connect to server", epid_connect_errors[0]); - return -1; - } - printf("PSM2 client-server connection established.\n"); - } - return 0; -} -char msgbuf[BUFFER_LENGTH]; - -int my_psm2_sendrecv(int rank, int sender, int receiver) { - int is_server = (rank == receiver) ? 1 : 0; - int rc; - psm2_mq_t q; - psm2_mq_req_t req_mq; - //char msgbuf[BUFFER_LENGTH]; - - register long rsp asm ("rsp"); - printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); fflush(stdout); - - memset(msgbuf, 0, BUFFER_LENGTH); - - /* Setup our PSM2 message queue */ - if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) - != PSM2_OK) { - die("couldn't initialize PSM2 MQ", rc); - } - printf("PSM2 MQ init done.\n"); - if (is_server) { - psm2_mq_tag_t t = {0xABCD}; - psm2_mq_tag_t tm = {-1}; - /* Post the receive request */ - if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, - &t, /* message tag */ - &tm, /* message tag mask */ - 0, /* no flags */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_irecv()", rc); - } - printf("PSM2 MQ irecv() posted\n"); - /* Wait until the message arrives */ - if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { - die("couldn't wait for the irecv", rc); - } - printf("PSM2 MQ wait() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - - if (is_server) { - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - unlink(fn); - } - } else { - /* Say hello */ - snprintf(msgbuf, BUFFER_LENGTH, - "Hello world from epid=0x%lx, pid=%d.\n", - myepid, getpid()); - psm2_mq_tag_t t = {0xABCD}; - if ((rc = psm2_mq_send2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - } - printf("PSM2 MQ send() done.\n"); - } -/* Close down the MQ */ - if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { - die("couldn't psm2_mq_finalize()", rc); - } - printf("PSM2 MQ finalized.\n"); -/* Close our ep, releasing all hardware resources. - * * Try to close all connections properly */ - if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, - 0 /* no timeout */)) != PSM2_OK) { - die("couldn't psm2_ep_close()", rc); - } - printf("PSM2 ep closed.\n"); - /* Release all local PSM2 resources */ - if ((rc = psm2_finalize()) != PSM2_OK) { - die("couldn't psm2_finalize()", rc); - } - printf("PSM2 shut down, exiting.\n"); - return 0; -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -struct thr_arg { - pthread_barrier_t bar; - pthread_t pthread; - int rank; - int ppn; - int nproc; - int server_rank; -}; - -struct thr_arg thr_arg; - -void *progress_fn(void *arg) { - struct thr_arg *thr_arg = (struct thr_arg *)arg; - int rc; - int i; - - rc = syscall(732); - if (rc == -1) - fprintf(stdout, "CT09100 progress_fn running on Linux OK\n"); - else { - fprintf(stdout, "CT09100 progress_fn running on McKernel NG (%d)\n", rc); - } - - printf("progress,enter\n"); - - pthread_barrier_wait(&thr_arg->bar); - -#if 1 - my_psm2_init(thr_arg->rank, thr_arg->server_rank); - my_psm2_connect(thr_arg->rank, thr_arg->server_rank); - - for (i = 0; i < thr_arg->nproc; i++) { - if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { - if (thr_arg->rank < i) { - my_psm2_sendrecv(thr_arg->rank, thr_arg->rank, i); - } else { - my_psm2_sendrecv(thr_arg->rank, i, thr_arg->rank); - } - } - } -#endif - - pthread_barrier_wait(&thr_arg->bar); - - - printf("progress,exit\n"); - return NULL; -} - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int ppn = -1; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *sbuf, *rbuf; - MPI_Request* reqs; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - pthread_barrierattr_t barrierattr; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - char *rank_str = getenv("PMI_RANK"); - if (!rank_str) { - printf("getenv failed\n"); - exit(1); - } - my_rank = atoi(rank_str); - printf("my_rank=%d\n", my_rank); fflush(stdout); - - nproc = 2; - - if (my_rank == 0) { - printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - - /* Spawn a thread */ - thr_arg.rank = my_rank; - thr_arg.ppn = ppn; - thr_arg.nproc = nproc; - thr_arg.server_rank = ppn + (my_rank % ppn); - - pthread_barrierattr_init(&barrierattr); - pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); - - char *uti_str = getenv("DISABLE_UTI"); - int uti_val = uti_str ? atoi(uti_str) : 0; - if (!uti_val) { - rc = syscall(731, 1, NULL); - if (rc) { - fprintf(stdout, "CT09003 INFO: uti not available (rc=%d)\n", rc); - } else { - fprintf(stdout, "CT09003 INFO: uti available\n"); - } - } else { - fprintf(stdout, "CT09003 INFO: uti disabled\n"); - } - - rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); - if (rc){ - fprintf(stdout, "pthread_create: %d\n", rc); - exit(1); - } - - pthread_barrier_wait(&thr_arg.bar); - - pthread_barrier_wait(&thr_arg.bar); - - pthread_join(thr_arg.pthread, NULL); - - fn_exit: - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include /* required for core PSM2 functions */ +#include /* required for PSM2 MQ functions (send, recv, etc) */ +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BUFFER_LENGTH /*8000000*/(1ULL<<12) +#define CONNECT_ARRAY_SIZE 8 +void die(char *msg, int rc) +{ + fprintf(stderr, "%s: %d\n", msg, rc); + fflush(stderr); +} + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* isend-calc-wait */ +void my_send(int nproc, int ppn, int rank, double *sbuf, double *rbuf, + int ndoubles, MPI_Request *reqs, long calc_nsec) +{ + int i; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + MPI_Irecv(rbuf + r * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + r++; + req++; + MPI_Isend(sbuf + s * ndoubles, ndoubles, MPI_DOUBLE, + i, 0, MPI_COMM_WORLD, &reqs[req]); + s++; + req++; + } + } + fwq(calc_nsec); + MPI_Waitall(req, reqs, MPI_STATUSES_IGNORE); +} + + +/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ +psm2_epid_t find_server(int rank) +{ + FILE *fp = NULL; + psm2_epid_t server_epid = 0; + char fn[256]; + + printf("%s: enter\n", __func__); fflush(stdout); + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + printf("PSM2 client waiting for epid mapping file to appear...\n"); + fflush(stdout); + while (!fp) { + sleep(1); + fp = fopen(fn, "r"); + } + fscanf(fp, "%lx", &server_epid); + fclose(fp); + printf("PSM2 client found server epid = 0x%lx\n", server_epid); + return server_epid; +} + +void write_epid_to_file(int rank, psm2_epid_t myepid) +{ + FILE *fp; + char fn[256]; + + printf("%s: enter\n", __func__); + sprintf(fn, "psm2-demo-server-epid-%d", rank); + fp = fopen(fn, "w"); + if (!fp) { + fprintf(stderr, + "Exiting, couldn't write server's epid mapping file: "); + die(strerror(errno), errno); + } + fprintf(fp, "0x%lx", myepid); + fclose(fp); + printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); +} + +psm2_uuid_t uuid; +psm2_ep_t myep; +psm2_epid_t myepid; +psm2_epid_t server_epid; +psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; +int epid_array_mask[CONNECT_ARRAY_SIZE]; +psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; +psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; + +int my_psm2_init(int my_rank, int server_rank) +{ + struct psm2_ep_open_opts o; + int rc; + int ver_major = PSM2_VERNO_MAJOR; + int ver_minor = PSM2_VERNO_MINOR; + + printf("%s: my_rank=%d,server_rank=%d\n", + __func__, my_rank, server_rank); + fflush(stdout); + memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ + /* Try to initialize PSM2 with the requested library version. + * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR + * as defined in the PSM2 headers, ensure that we are linking with + * the same version of PSM2 as we compiled against. + */ + + if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { + die("couldn't init", rc); + } + printf("PSM2 init done.\n"); + /* Setup the endpoint options struct */ + if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { + die("couldn't set default opts", rc); + } + printf("PSM2 opts_get_defaults done.\n"); + /* Attempt to open a PSM2 endpoint. This allocates hardware resources. + */ + if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { + die("couldn't psm2_ep_open()", rc); + } + printf("PSM2 endpoint open done.\n"); + + return 0; +} +int my_psm2_connect(int my_rank, int server_rank) +{ + int rc; + int is_server = (my_rank == server_rank) ? 1 : 0; + + printf("%s: my_rank=%d,server_rank=%d\n", + __func__, my_rank, server_rank); + fflush(stdout); + if (is_server) { + write_epid_to_file(my_rank, myepid); + } else { + server_epid = find_server(server_rank); + } + printf("%s: epid exchange done\n", __func__); + fflush(stdout); + if (is_server) { + /* Server does nothing here. A connection does not have to be + * established to receive messages. + */ + printf("PSM2 server up.\n"); + } else { + /* Setup connection request info. + * PSM2 can connect to a single epid per request, + * or an arbitrary number of epids in a single connect call. + * For this example, use part of an array of + * connection requests. + */ + memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); + epid_array[0] = server_epid; + epid_array_mask[0] = 1; + /* Begin the connection process. + * note that if a requested epid is not responding, + * the connect call will still return OK. + * The errors array will contain the state of individual + * connection requests. + */ + if ((rc = psm2_ep_connect(myep, + CONNECT_ARRAY_SIZE, + epid_array, + epid_array_mask, + epid_connect_errors, + epaddr_array, + 0 /* no timeout */ + )) != PSM2_OK) { + die("couldn't ep_connect", rc); + return -1; + } + printf("PSM2 connect request processed.\n"); + /* Now check if our connection to the server is ready */ + if (epid_connect_errors[0] != PSM2_OK) { + die("couldn't connect to server", + epid_connect_errors[0]); + return -1; + } + printf("PSM2 client-server connection established.\n"); + } + return 0; +} +char msgbuf[BUFFER_LENGTH]; + +int my_psm2_sendrecv(int rank, int sender, int receiver) +{ + int is_server = (rank == receiver) ? 1 : 0; + int rc; + psm2_mq_t q; + psm2_mq_req_t req_mq; + //char msgbuf[BUFFER_LENGTH]; + + register long rsp asm ("rsp"); + printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); + fflush(stdout); + + memset(msgbuf, 0, BUFFER_LENGTH); + + /* Setup our PSM2 message queue */ + if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) + != PSM2_OK) { + die("couldn't initialize PSM2 MQ", rc); + } + printf("PSM2 MQ init done.\n"); + if (is_server) { + psm2_mq_tag_t t = {0xABCD}; + psm2_mq_tag_t tm = {-1}; + /* Post the receive request */ + if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, + &t, /* message tag */ + &tm, /* message tag mask */ + 0, /* no flags */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_irecv()", rc); + } + printf("PSM2 MQ irecv() posted\n"); + /* Wait until the message arrives */ + if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { + die("couldn't wait for the irecv", rc); + } + printf("PSM2 MQ wait() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + + if (is_server) { + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + unlink(fn); + } + } else { + /* Say hello */ + snprintf(msgbuf, BUFFER_LENGTH, + "Hello world from epid=0x%lx, pid=%d.\n", + myepid, getpid()); + psm2_mq_tag_t t = {0xABCD}; + + if ((rc = psm2_mq_send2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + } + printf("PSM2 MQ send() done.\n"); + } + /* Close down the MQ */ + if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { + die("couldn't psm2_mq_finalize()", rc); + } + printf("PSM2 MQ finalized.\n"); + /* Close our ep, releasing all hardware resources. + * Try to close all connections properly + */ + if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, + 0 /* no timeout */)) != PSM2_OK) { + die("couldn't psm2_ep_close()", rc); + } + printf("PSM2 ep closed.\n"); + /* Release all local PSM2 resources */ + if ((rc = psm2_finalize()) != PSM2_OK) { + die("couldn't psm2_finalize()", rc); + } + printf("PSM2 shut down, exiting.\n"); + return 0; +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +struct thr_arg { + pthread_barrier_t bar; + pthread_t pthread; + int rank; + int ppn; + int nproc; + int server_rank; +}; + +struct thr_arg thr_arg; + +void *progress_fn(void *arg) +{ + struct thr_arg *thr_arg = (struct thr_arg *)arg; + int rc; + int i; + + rc = syscall(732); + if (rc == -1) + fprintf(stdout, "CT09100 %s running on Linux OK\n", + __func__); + else { + fprintf(stdout, "CT09100 %s running on McKernel NG (%d)\n", + __func__, rc); + } + + printf("progress,enter\n"); + + pthread_barrier_wait(&thr_arg->bar); + +#if 1 + my_psm2_init(thr_arg->rank, thr_arg->server_rank); + my_psm2_connect(thr_arg->rank, thr_arg->server_rank); + + for (i = 0; i < thr_arg->nproc; i++) { + if (!on_same_node(thr_arg->ppn, thr_arg->rank, i)) { + if (thr_arg->rank < i) { + my_psm2_sendrecv(thr_arg->rank, thr_arg->rank, + i); + } else { + my_psm2_sendrecv(thr_arg->rank, i, + thr_arg->rank); + } + } + } +#endif + + pthread_barrier_wait(&thr_arg->bar); + + + printf("progress,exit\n"); + return NULL; +} + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int ppn = -1; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *sbuf, *rbuf; + MPI_Request *reqs; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + pthread_barrierattr_t barrierattr; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + char *rank_str = getenv("PMI_RANK"); + + if (!rank_str) { + printf("getenv failed\n"); + exit(1); + } + my_rank = atoi(rank_str); + printf("my_rank=%d\n", my_rank); fflush(stdout); + + nproc = 2; + + if (my_rank == 0) { + printf("tid=%d,pid=%d,ndoubles=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + + /* Spawn a thread */ + thr_arg.rank = my_rank; + thr_arg.ppn = ppn; + thr_arg.nproc = nproc; + thr_arg.server_rank = ppn + (my_rank % ppn); + + pthread_barrierattr_init(&barrierattr); + pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); + + char *uti_str = getenv("DISABLE_UTI"); + int uti_val = uti_str ? atoi(uti_str) : 0; + + if (!uti_val) { + rc = syscall(731, 1, NULL); + if (rc) { + fprintf(stdout, + "CT09003 INFO: uti not available (rc=%d)\n", + rc); + } else { + fprintf(stdout, "CT09003 INFO: uti available\n"); + } + } else { + fprintf(stdout, "CT09003 INFO: uti disabled\n"); + } + + rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); + if (rc) { + fprintf(stdout, "pthread_create: %d\n", rc); + exit(1); + } + + pthread_barrier_wait(&thr_arg.bar); + + pthread_barrier_wait(&thr_arg.bar); + + pthread_join(thr_arg.pthread, NULL); + + fn_exit: + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/010.c b/test/uti/mpi/010.c index 65ed6d55..a44fedd7 100755 --- a/test/uti/mpi/010.c +++ b/test/uti/mpi/010.c @@ -1,508 +1,424 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include - -#include /* required for core PSM2 functions */ -#include /* required for PSM2 MQ functions (send, recv, etc) */ - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define BUFFER_LENGTH /*8000000*/(1ULL<<12) -#define CONNECT_ARRAY_SIZE 8 -void die(char *msg, int rc) { - fprintf(stderr, "%s: %d\n", msg, rc); - fflush(stderr); -} - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 1 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,pid=%d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, getpid(), tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ -psm2_epid_t find_server(int rank) { - FILE *fp = NULL; - psm2_epid_t server_epid = 0; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); fflush(stdout); - - sprintf(fn, "psm2-demo-server-epid-%d", rank); - printf("PSM2 client waiting for epid mapping file to appear...\n"); fflush(stdout); - while (!fp) { - sleep(1); - fp = fopen(fn, "r"); - } - fscanf(fp, "%lx", &server_epid); - fclose(fp); - printf("PSM2 client found server epid = 0x%lx\n", server_epid); - return server_epid; -} - -void write_epid_to_file(int rank, psm2_epid_t myepid) { - FILE *fp; - char fn[256]; - printf("%s: enter\n", __FUNCTION__); - sprintf(fn, "psm2-demo-server-epid-%d", rank); - fp = fopen(fn, "w"); - if (!fp) { - fprintf(stderr, - "Exiting, couldn't write server's epid mapping file: "); - die(strerror(errno), errno); - } - fprintf(fp, "0x%lx", myepid); - fclose(fp); - printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); - return; -} - -psm2_uuid_t uuid; -psm2_ep_t myep; -psm2_epid_t myepid; -psm2_epid_t server_epid; -psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; -int epid_array_mask[CONNECT_ARRAY_SIZE]; -psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; -psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; - -int my_psm2_init(int my_rank, int server_rank) { - struct psm2_ep_open_opts o; - int rc; - int ver_major = PSM2_VERNO_MAJOR; - int ver_minor = PSM2_VERNO_MINOR; - - printf("%s: my_rank=%d,server_rank=%d\n", __FUNCTION__, my_rank, server_rank); fflush(stdout); - memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ -/* Try to initialize PSM2 with the requested library version. - * * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR - * * as defined in the PSM2 headers, ensure that we are linking with - * * the same version of PSM2 as we compiled against. */ - - if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { - die("couldn't init", rc); - } - printf("PSM2 init done.\n"); - /* Setup the endpoint options struct */ - if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { - die("couldn't set default opts", rc); - } - printf("PSM2 opts_get_defaults done.\n"); - /* Attempt to open a PSM2 endpoint. This allocates hardware resources. */ - if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { - die("couldn't psm2_ep_open()", rc); - } - printf("PSM2 endpoint open done.\n"); - - return 0; -} -int my_psm2_connect(int my_rank, int server_rank) { - int rc; - int is_server = (my_rank == server_rank) ? 1 : 0; - printf("%s: my_rank=%d,server_rank=%d\n", __FUNCTION__, my_rank, server_rank); fflush(stdout); - if (is_server) { - write_epid_to_file(my_rank, myepid); - } else { - server_epid = find_server(server_rank); - } - printf("%s: epid exchange done\n", __FUNCTION__); fflush(stdout); - if (is_server) { - /* Server does nothing here. A connection does not have to be - * * established to receive messages. */ - printf("PSM2 server up.\n"); - } else { - /* Setup connection request info */ - /* PSM2 can connect to a single epid per request, - * * or an arbitrary number of epids in a single connect call. - * * For this example, use part of an array of - * * connection requests. */ - memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); - epid_array[0] = server_epid; - epid_array_mask[0] = 1; - /* Begin the connection process. - * * note that if a requested epid is not responding, - * * the connect call will still return OK. - * * The errors array will contain the state of individual - * * connection requests. */ - if ((rc = psm2_ep_connect(myep, - CONNECT_ARRAY_SIZE, - epid_array, - epid_array_mask, - epid_connect_errors, - epaddr_array, - 0 /* no timeout */ - )) != PSM2_OK) { - die("couldn't ep_connect", rc); - return -1; - } - printf("PSM2 connect request processed.\n"); - /* Now check if our connection to the server is ready */ - if (epid_connect_errors[0] != PSM2_OK) { - die("couldn't connect to server", epid_connect_errors[0]); - return -1; - } - printf("PSM2 client-server connection established.\n"); - } - return 0; -} -char msgbuf[BUFFER_LENGTH]; - -int my_psm2_sendrecv(int rank, int sender, int receiver) { - int is_server = (rank == receiver) ? 1 : 0; - int rc; - psm2_mq_t q; - psm2_mq_req_t req_mq; - //char msgbuf[BUFFER_LENGTH]; - - register long rsp asm ("rsp"); - printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); fflush(stdout); - - memset(msgbuf, 0, BUFFER_LENGTH); - - /* Setup our PSM2 message queue */ - if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) - != PSM2_OK) { - die("couldn't initialize PSM2 MQ", rc); - } - printf("PSM2 MQ init done.\n"); - if (is_server) { - psm2_mq_tag_t t = {0xABCD}; - psm2_mq_tag_t tm = {-1}; - /* Post the receive request */ - if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, - &t, /* message tag */ - &tm, /* message tag mask */ - 0, /* no flags */ - msgbuf, BUFFER_LENGTH, - NULL, /* no context to add */ - &req_mq /* track irecv status */ - )) != PSM2_OK) { - die("couldn't post psm2_mq_irecv()", rc); - } - printf("PSM2 MQ irecv() posted\n"); - /* Wait until the message arrives */ - if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { - die("couldn't wait for the irecv", rc); - } - printf("PSM2 MQ wait() done.\n"); - printf("Message from client:\n"); - printf("%s", msgbuf); - - if (is_server) { - char fn[256]; - sprintf(fn, "psm2-demo-server-epid-%d", rank); - unlink(fn); - } - } else { - /* Say hello */ - snprintf(msgbuf, BUFFER_LENGTH, - "Hello world from epid=0x%lx, pid=%d.\n", - myepid, getpid()); - psm2_mq_tag_t t = {0xABCD}; - if ((rc = psm2_mq_send2(q, - epaddr_array[0], /* destination epaddr */ - PSM2_MQ_FLAG_SENDSYNC, /* no flags */ - &t, /* tag */ - msgbuf, BUFFER_LENGTH - )) != PSM2_OK) { - die("couldn't post psm2_mq_isend", rc); - } - printf("PSM2 MQ send() done.\n"); - } -/* Close down the MQ */ - if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { - die("couldn't psm2_mq_finalize()", rc); - } - printf("PSM2 MQ finalized.\n"); -/* Close our ep, releasing all hardware resources. - * * Try to close all connections properly */ - if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, - 0 /* no timeout */)) != PSM2_OK) { - die("couldn't psm2_ep_close()", rc); - } - printf("PSM2 ep closed.\n"); - /* Release all local PSM2 resources */ - if ((rc = psm2_finalize()) != PSM2_OK) { - die("couldn't psm2_finalize()", rc); - } - printf("PSM2 shut down, exiting.\n"); - return 0; -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -struct thr_arg { - pthread_barrier_t bar; - pthread_t pthread; - int rank; - int ppn; - int nproc; - int server_rank; -}; - -struct thr_arg thr_arg; - -void *progress_fn(void *arg) { - struct thr_arg *thr_arg = (struct thr_arg *)arg; - int rc; - int i; - - rc = syscall(732); - if (rc == -1) - fprintf(stdout, "CT09100 progress_fn running on Linux OK\n"); - else { - fprintf(stdout, "CT09100 progress_fn running on McKernel NG (%d)\n", rc); - } - - printf("progress,enter\n"); - - pthread_barrier_wait(&thr_arg->bar); - - pthread_barrier_wait(&thr_arg->bar); - - - printf("progress,exit\n"); - return NULL; -} - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int ppn = -1; - int my_rank = -1, size = -1; - int i, j; - struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - pthread_barrierattr_t barrierattr; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+P:", options, NULL)) != -1) { - switch (opt) { - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ppn == -1) { - printf("specify ppn with --ppn"); - exit(1); - } - - char *rank_str = getenv("PMI_RANK"); - if (!rank_str) { - printf("getenv failed\n"); - exit(1); - } - my_rank = atoi(rank_str); - printf("my_rank=%d\n", my_rank); fflush(stdout); - - nproc = 2; - - if (my_rank == 0) { - printf("tid=%d,pid=%d,nproc=%d\n", syscall(__NR_gettid), getpid(), nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - - /* Spawn a thread */ - thr_arg.rank = my_rank; - thr_arg.ppn = ppn; - thr_arg.nproc = nproc; - thr_arg.server_rank = ppn + (my_rank % ppn); - - pthread_barrierattr_init(&barrierattr); - pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); - - char *uti_str = getenv("DISABLE_UTI"); - int uti_val = uti_str ? atoi(uti_str) : 0; - if (!uti_val) { - rc = syscall(731, 1, NULL); - if (rc) { - fprintf(stdout, "CT09003 INFO: uti not available (rc=%d)\n", rc); - } else { - fprintf(stdout, "CT09003 INFO: uti available\n"); - } - } else { - fprintf(stdout, "CT09003 INFO: uti disabled\n"); - } - - rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); - if (rc){ - fprintf(stdout, "pthread_create: %d\n", rc); - exit(1); - } - - pthread_barrier_wait(&thr_arg.bar); - - my_psm2_init(thr_arg.rank, thr_arg.server_rank); - my_psm2_connect(thr_arg.rank, thr_arg.server_rank); - - for (i = 0; i < thr_arg.nproc; i++) { - if (!on_same_node(thr_arg.ppn, thr_arg.rank, i)) { - if (thr_arg.rank < i) { - my_psm2_sendrecv(thr_arg.rank, thr_arg.rank, i); - } else { - my_psm2_sendrecv(thr_arg.rank, i, thr_arg.rank); - } - } - } - - pthread_barrier_wait(&thr_arg.bar); - - pthread_join(thr_arg.pthread, NULL); - - fn_exit: - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include /* required for core PSM2 functions */ +#include /* required for PSM2 MQ functions (send, recv, etc) */ +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BUFFER_LENGTH /*8000000*/(1ULL<<12) +#define CONNECT_ARRAY_SIZE 8 +void die(char *msg, int rc) +{ + fprintf(stderr, "%s: %d\n", msg, rc); + fflush(stderr); +} + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* Helper functions to find the server's PSM2 endpoint identifier (epid). */ +psm2_epid_t find_server(int rank) +{ + FILE *fp = NULL; + psm2_epid_t server_epid = 0; + char fn[256]; + + printf("%s: enter\n", __func__); fflush(stdout); + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + printf("PSM2 client waiting for epid mapping file to appear...\n"); + fflush(stdout); + + while (!fp) { + sleep(1); + fp = fopen(fn, "r"); + } + fscanf(fp, "%lx", &server_epid); + fclose(fp); + printf("PSM2 client found server epid = 0x%lx\n", server_epid); + return server_epid; +} + +void write_epid_to_file(int rank, psm2_epid_t myepid) +{ + FILE *fp; + char fn[256]; + + printf("%s: enter\n", __func__); + sprintf(fn, "psm2-demo-server-epid-%d", rank); + fp = fopen(fn, "w"); + if (!fp) { + fprintf(stderr, + "Exiting, couldn't write server's epid mapping file: "); + die(strerror(errno), errno); + } + fprintf(fp, "0x%lx", myepid); + fclose(fp); + printf("PSM2 server wrote epid = 0x%lx to file.\n", myepid); +} + +psm2_uuid_t uuid; +psm2_ep_t myep; +psm2_epid_t myepid; +psm2_epid_t server_epid; +psm2_epid_t epid_array[CONNECT_ARRAY_SIZE]; +int epid_array_mask[CONNECT_ARRAY_SIZE]; +psm2_error_t epid_connect_errors[CONNECT_ARRAY_SIZE]; +psm2_epaddr_t epaddr_array[CONNECT_ARRAY_SIZE]; + +int my_psm2_init(int my_rank, int server_rank) +{ + struct psm2_ep_open_opts o; + int rc; + int ver_major = PSM2_VERNO_MAJOR; + int ver_minor = PSM2_VERNO_MINOR; + + printf("%s: my_rank=%d,server_rank=%d\n", + __func__, my_rank, server_rank); + fflush(stdout); + memset(uuid, 0, sizeof(psm2_uuid_t)); /* Use a UUID of zero */ + /* Try to initialize PSM2 with the requested library version. + * In this example, given the use of the PSM2_VERNO_MAJOR and MINOR + * as defined in the PSM2 headers, ensure that we are linking with + * the same version of PSM2 as we compiled against. + */ + + if ((rc = psm2_init(&ver_major, &ver_minor)) != PSM2_OK) { + die("couldn't init", rc); + } + printf("PSM2 init done.\n"); + /* Setup the endpoint options struct */ + if ((rc = psm2_ep_open_opts_get_defaults(&o)) != PSM2_OK) { + die("couldn't set default opts", rc); + } + printf("PSM2 opts_get_defaults done.\n"); + /* Attempt to open a PSM2 endpoint. This allocates hardware resources. + */ + if ((rc = psm2_ep_open(uuid, &o, &myep, &myepid)) != PSM2_OK) { + die("couldn't psm2_ep_open()", rc); + } + printf("PSM2 endpoint open done.\n"); + + return 0; +} + +int my_psm2_connect(int my_rank, int server_rank) +{ + int rc; + int is_server = (my_rank == server_rank) ? 1 : 0; + + printf("%s: my_rank=%d,server_rank=%d\n", + __func__, my_rank, server_rank); + fflush(stdout); + if (is_server) { + write_epid_to_file(my_rank, myepid); + } else { + server_epid = find_server(server_rank); + } + printf("%s: epid exchange done\n", __func__); + fflush(stdout); + if (is_server) { + /* Server does nothing here. A connection does not have to be + * established to receive messages. + */ + printf("PSM2 server up.\n"); + } else { + /* Setup connection request info */ + /* PSM2 can connect to a single epid per request, + * or an arbitrary number of epids in a single connect call. + * For this example, use part of an array of + * connection requests. + */ + memset(epid_array_mask, 0, sizeof(int) * CONNECT_ARRAY_SIZE); + epid_array[0] = server_epid; + epid_array_mask[0] = 1; + /* Begin the connection process. + * note that if a requested epid is not responding, + * the connect call will still return OK. + * The errors array will contain the state of individual + * connection requests. + */ + if ((rc = psm2_ep_connect(myep, + CONNECT_ARRAY_SIZE, + epid_array, + epid_array_mask, + epid_connect_errors, + epaddr_array, + 0 /* no timeout */ + )) != PSM2_OK) { + die("couldn't ep_connect", rc); + return -1; + } + printf("PSM2 connect request processed.\n"); + /* Now check if our connection to the server is ready */ + if (epid_connect_errors[0] != PSM2_OK) { + die("couldn't connect to server", + epid_connect_errors[0]); + return -1; + } + printf("PSM2 client-server connection established.\n"); + } + return 0; +} +char msgbuf[BUFFER_LENGTH]; + +int my_psm2_sendrecv(int rank, int sender, int receiver) +{ + int is_server = (rank == receiver) ? 1 : 0; + int rc; + psm2_mq_t q; + psm2_mq_req_t req_mq; + //char msgbuf[BUFFER_LENGTH]; + + register long rsp asm ("rsp"); + printf("rsp=%lx.msgbuf=%p\n", rsp, msgbuf); fflush(stdout); + + memset(msgbuf, 0, BUFFER_LENGTH); + + /* Setup our PSM2 message queue */ + if ((rc = psm2_mq_init(myep, PSM2_MQ_ORDERMASK_NONE, NULL, 0, &q)) + != PSM2_OK) { + die("couldn't initialize PSM2 MQ", rc); + } + printf("PSM2 MQ init done.\n"); + if (is_server) { + psm2_mq_tag_t t = {0xABCD}; + psm2_mq_tag_t tm = {-1}; + /* Post the receive request */ + if ((rc = psm2_mq_irecv2(q, PSM2_MQ_ANY_ADDR, + &t, /* message tag */ + &tm, /* message tag mask */ + 0, /* no flags */ + msgbuf, BUFFER_LENGTH, + NULL, /* no context to add */ + &req_mq /* track irecv status */ + )) != PSM2_OK) { + die("couldn't post psm2_mq_irecv()", rc); + } + printf("PSM2 MQ irecv() posted\n"); + /* Wait until the message arrives */ + if ((rc = psm2_mq_wait(&req_mq, NULL)) != PSM2_OK) { + die("couldn't wait for the irecv", rc); + } + printf("PSM2 MQ wait() done.\n"); + printf("Message from client:\n"); + printf("%s", msgbuf); + + if (is_server) { + char fn[256]; + + sprintf(fn, "psm2-demo-server-epid-%d", rank); + unlink(fn); + } + } else { + /* Say hello */ + snprintf(msgbuf, BUFFER_LENGTH, + "Hello world from epid=0x%lx, pid=%d.\n", + myepid, getpid()); + psm2_mq_tag_t t = {0xABCD}; + + if ((rc = psm2_mq_send2(q, + epaddr_array[0], /* destination epaddr */ + PSM2_MQ_FLAG_SENDSYNC, /* no flags */ + &t, /* tag */ + msgbuf, BUFFER_LENGTH + )) != PSM2_OK) { + die("couldn't post psm2_mq_isend", rc); + } + printf("PSM2 MQ send() done.\n"); + } + /* Close down the MQ */ + if ((rc = psm2_mq_finalize(q)) != PSM2_OK) { + die("couldn't psm2_mq_finalize()", rc); + } + printf("PSM2 MQ finalized.\n"); + /* Close our ep, releasing all hardware resources. + * Try to close all connections properly + */ + if ((rc = psm2_ep_close(myep, PSM2_EP_CLOSE_GRACEFUL, + 0 /* no timeout */)) != PSM2_OK) { + die("couldn't psm2_ep_close()", rc); + } + printf("PSM2 ep closed.\n"); + /* Release all local PSM2 resources */ + if ((rc = psm2_finalize()) != PSM2_OK) { + die("couldn't psm2_finalize()", rc); + } + printf("PSM2 shut down, exiting.\n"); + return 0; +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +struct thr_arg { + pthread_barrier_t bar; + pthread_t pthread; + int rank; + int ppn; + int nproc; + int server_rank; +}; + +struct thr_arg thr_arg; + +void *progress_fn(void *arg) +{ + struct thr_arg *thr_arg = (struct thr_arg *)arg; + int rc; + int i; + + rc = syscall(732); + if (rc == -1) + fprintf(stdout, "CT09100 %s running on Linux OK\n", + __func__); + else { + fprintf(stdout, "CT09100 %s running on McKernel NG (%d)\n", + __func__, rc); + } + + printf("progress,enter\n"); + + pthread_barrier_wait(&thr_arg->bar); + + pthread_barrier_wait(&thr_arg->bar); + + + printf("progress,exit\n"); + return NULL; +} + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int ppn = -1; + int my_rank = -1, size = -1; + int i, j; + struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + pthread_barrierattr_t barrierattr; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+P:", options, NULL)) != -1) { + switch (opt) { + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ppn == -1) { + printf("specify ppn with --ppn"); + exit(1); + } + + char *rank_str = getenv("PMI_RANK"); + + if (!rank_str) { + printf("getenv failed\n"); + exit(1); + } + my_rank = atoi(rank_str); + printf("my_rank=%d\n", my_rank); fflush(stdout); + + nproc = 2; + + if (my_rank == 0) { + printf("tid=%d,pid=%d,nproc=%d\n", + syscall(__NR_gettid), getpid(), nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + + /* Spawn a thread */ + thr_arg.rank = my_rank; + thr_arg.ppn = ppn; + thr_arg.nproc = nproc; + thr_arg.server_rank = ppn + (my_rank % ppn); + + pthread_barrierattr_init(&barrierattr); + pthread_barrier_init(&thr_arg.bar, &barrierattr, nproc); + + char *uti_str = getenv("DISABLE_UTI"); + int uti_val = uti_str ? atoi(uti_str) : 0; + + if (!uti_val) { + rc = syscall(731, 1, NULL); + if (rc) { + fprintf(stdout, + "CT09003 INFO: uti not available (rc=%d)\n", + rc); + } else { + fprintf(stdout, "CT09003 INFO: uti available\n"); + } + } else { + fprintf(stdout, "CT09003 INFO: uti disabled\n"); + } + + rc = pthread_create(&thr_arg.pthread, NULL, progress_fn, &thr_arg); + if (rc) { + fprintf(stdout, "pthread_create: %d\n", rc); + exit(1); + } + + pthread_barrier_wait(&thr_arg.bar); + + my_psm2_init(thr_arg.rank, thr_arg.server_rank); + my_psm2_connect(thr_arg.rank, thr_arg.server_rank); + + for (i = 0; i < thr_arg.nproc; i++) { + if (!on_same_node(thr_arg.ppn, thr_arg.rank, i)) { + if (thr_arg.rank < i) { + my_psm2_sendrecv(thr_arg.rank, thr_arg.rank, i); + } else { + my_psm2_sendrecv(thr_arg.rank, i, thr_arg.rank); + } + } + } + + pthread_barrier_wait(&thr_arg.bar); + + pthread_join(thr_arg.pthread, NULL); + + fn_exit: + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/011.c b/test/uti/mpi/011.c index 0cc48cb3..e622563b 100755 --- a/test/uti/mpi/011.c +++ b/test/uti/mpi/011.c @@ -1,220 +1,197 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define SZENTRY_DEFAULT (65536) /* Size of one slot */ -#define NENTRY_DEFAULT 10000 /* Number of slots */ - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, int src, int dest, MPI_Request* reqs, MPI_Status* status, double usec) { - int i; - if(rank == 1) { - for(i = 0; i < nentry; i++) { - MPI_Isend(sendv[i], szentry, MPI_CHAR, dest, 0, MPI_COMM_WORLD, &reqs[i]); - if (nentry > 10 && i % (nentry / 10) == 0) { - printf("s"); fflush(stdout); - } - } - MPI_Waitall(nentry, reqs, status); - printf("w\n"); fflush(stdout); - } else { - for(i = 0; i < nentry; i++) { - MPI_Irecv(recvv[i], szentry, MPI_CHAR, src, 0, MPI_COMM_WORLD, &reqs[i]); - if (nentry > 10 && i % (nentry / 10) == 0) { - printf("r"); fflush(stdout); - } - } - usleep(usec); - MPI_Waitall(nentry, reqs, status); - printf("W\n"); fflush(stdout); - } -} - -int main(int argc, char **argv) { - int my_rank = -1, size = -1; - int i, j; - char **sendv, **recvv; - MPI_Status* status; - MPI_Request* reqs; - long szentry; - long nentry; - int src, dest; - struct timespec start, end; - double diffusec; - - if(argc == 3) { - szentry = atoi(argv[1]); - nentry = atoi(argv[2]); - } else { - szentry = SZENTRY_DEFAULT; - nentry = NENTRY_DEFAULT; - } - printf("szentry=%ld,nentry=%ld\n", szentry, nentry); - - status = (MPI_Status*)malloc(sizeof(MPI_Status) * nentry); - reqs = (MPI_Request*)malloc(sizeof(MPI_Request) * nentry); - - int actual; - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - printf("Thread support level is %d\n", actual); - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &size); - - src = (size + my_rank - 1) % size; - dest = (my_rank + 1) % size; - - printf("rank=%d, size=%d, src=%d, dest=%d\n", my_rank, size, src, dest); - - sendv = malloc(sizeof(char *) * nentry); - if(!sendv) { printf("malloc failed"); goto fn_fail; } - for (i = 0; i < nentry; i++) { -#if 0 - int fd; - fd = open("./file", O_RDWR); - if(fd == -1) { printf("open failed\n"); goto fn_fail; } - sendv[i] = (char*)mmap(0, szentry, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); -#else - sendv[i] = (char*)mmap(0, szentry, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); -#endif - if(sendv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } - dprintf("[%d] sendv[%d]=%p\n", my_rank, i, sendv[i]); - memset(sendv[i], 0xaa, szentry); - } - - recvv = malloc(sizeof(char *) * nentry); - if(!recvv) { printf("malloc failed"); goto fn_fail; } - for (i = 0; i < nentry; i++) { -#if 0 - int fd; - fd = open("./file", O_RDWR); - if(fd == -1) { printf("open failed\n"); goto fn_fail; } - recvv[i] = (char*)mmap(0, szentry, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); -#else - recvv[i] = (char*)mmap(0, szentry, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); -#endif - if(recvv[i] == MAP_FAILED) { printf("mmap failed"); goto fn_fail; } - dprintf("[%d] recvv[%d]=%p\n", my_rank, i, recvv[i]); - memset(recvv[i], 0, szentry); - } - - printf("after memset\n"); - - print_cpu_last_executed_on(); - -#pragma omp parallel for - for (i = 0; i < omp_get_num_threads(); i++) { - printf("thread_num=%d,tid=%d\n", i, syscall(SYS_gettid)); - } - - for (i = 0; i < 1; i++) { - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &start); - } - sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, status, 0); - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &end); - diffusec = DIFFNSEC(end, start) / (double)1000; - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); - } - - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &start); - } - sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, reqs, status, diffusec); - MPI_Barrier(MPI_COMM_WORLD); - if(my_rank == 0) { - clock_gettime(CLOCK_REALTIME, &end); - printf("%4.4f sec\n", DIFFNSEC(end, start) / (double)1000000000); fflush(stdout); - } - } - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define SZENTRY_DEFAULT (65536) /* Size of one slot */ +#define NENTRY_DEFAULT 10000 /* Number of slots */ + +void sendrecv(int rank, int nentry, char **sendv, char **recvv, int szentry, + int src, int dest, MPI_Request *reqs, MPI_Status *status, + double usec) +{ + int i; + + if (rank == 1) { + for (i = 0; i < nentry; i++) { + MPI_Isend(sendv[i], szentry, MPI_CHAR, dest, 0, + MPI_COMM_WORLD, &reqs[i]); + if (nentry > 10 && i % (nentry / 10) == 0) { + printf("s"); + fflush(stdout); + } + } + MPI_Waitall(nentry, reqs, status); + printf("w\n"); fflush(stdout); + } else { + for (i = 0; i < nentry; i++) { + MPI_Irecv(recvv[i], szentry, MPI_CHAR, src, 0, + MPI_COMM_WORLD, &reqs[i]); + if (nentry > 10 && i % (nentry / 10) == 0) { + printf("r"); fflush(stdout); + } + } + usleep(usec); + MPI_Waitall(nentry, reqs, status); + printf("W\n"); fflush(stdout); + } +} + +int main(int argc, char **argv) +{ + int my_rank = -1, size = -1; + int i, j; + char **sendv, **recvv; + MPI_Status *status; + MPI_Request *reqs; + long szentry; + long nentry; + int src, dest; + struct timespec start, end; + double diffusec; + + if (argc == 3) { + szentry = atoi(argv[1]); + nentry = atoi(argv[2]); + } else { + szentry = SZENTRY_DEFAULT; + nentry = NENTRY_DEFAULT; + } + printf("szentry=%ld,nentry=%ld\n", szentry, nentry); + + status = (MPI_Status *)malloc(sizeof(MPI_Status) * nentry); + reqs = (MPI_Request *)malloc(sizeof(MPI_Request) * nentry); + + int actual; + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + printf("Thread support level is %d\n", actual); + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + + src = (size + my_rank - 1) % size; + dest = (my_rank + 1) % size; + + printf("rank=%d, size=%d, src=%d, dest=%d\n", + my_rank, size, src, dest); + + sendv = malloc(sizeof(char *) * nentry); + if (!sendv) { + printf("malloc failed"); + goto fn_fail; + } + for (i = 0; i < nentry; i++) { +#if 0 + int fd; + + fd = open("./file", O_RDWR); + if (fd == -1) { + printf("open failed\n"); + goto fn_fail; + } + sendv[i] = (char *)mmap(0, szentry, PROT_READ | PROT_WRITE, + MAP_PRIVATE, fd, 0); +#else + sendv[i] = (char *)mmap(0, szentry, PROT_READ | PROT_WRITE, + MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); +#endif + if (sendv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } + dprintf("[%d] sendv[%d]=%p\n", my_rank, i, sendv[i]); + memset(sendv[i], 0xaa, szentry); + } + + recvv = malloc(sizeof(char *) * nentry); + if (!recvv) { + printf("malloc failed"); + goto fn_fail; + } + for (i = 0; i < nentry; i++) { +#if 0 + int fd; + + fd = open("./file", O_RDWR); + if (fd == -1) { + printf("open failed\n"); + goto fn_fail; + } + recvv[i] = (char *)mmap(0, szentry, PROT_READ|PROT_WRITE, + MAP_PRIVATE, fd, 0); +#else + recvv[i] = (char *)mmap(0, szentry, PROT_READ|PROT_WRITE, + MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); +#endif + if (recvv[i] == MAP_FAILED) { + printf("mmap failed"); + goto fn_fail; + } + dprintf("[%d] recvv[%d]=%p\n", my_rank, i, recvv[i]); + memset(recvv[i], 0, szentry); + } + + printf("after memset\n"); + + print_cpu_last_executed_on("main"); + +#pragma omp parallel for + for (i = 0; i < omp_get_num_threads(); i++) { + printf("thread_num=%d,tid=%d\n", i, syscall(SYS_gettid)); + } + + for (i = 0; i < 1; i++) { + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &start); + } + sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, + reqs, status, 0); + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &end); + diffusec = DIFFNSEC(end, start) / (double)1000; + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); + } + + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &start); + } + sendrecv(my_rank, nentry, sendv, recvv, szentry, src, dest, + reqs, status, diffusec); + MPI_Barrier(MPI_COMM_WORLD); + if (my_rank == 0) { + clock_gettime(CLOCK_REALTIME, &end); + printf("%4.4f sec\n", + DIFFNSEC(end, start) / (double)1000000000); + fflush(stdout); + } + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/012.c b/test/uti/mpi/012.c index 9510de5e..0fa29b8a 100755 --- a/test/uti/mpi/012.c +++ b/test/uti/mpi/012.c @@ -1,338 +1,253 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while(0) -#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while(0) -#define FLUSH(win) do { MPI_Win_flush_local_all(win); } while(0) - - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 0 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - - if (delay_nsec < 0) { return; } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* get_acc-calc-flush_local */ -void rma(int nproc, int ppn, int rank, double *wbuf, double *rbuf, double *result, int ndoubles, MPI_Win win, long calc_nsec) { - int i, j; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - for (j = 0; j < ndoubles; j++) { - //printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", i, j, rbuf[i * ndoubles + j], wbuf[i * ndoubles + j]); - MPI_Get_accumulate(rbuf + i * ndoubles + j, 1, MPI_DOUBLE, - result + i * ndoubles + j, 1, MPI_DOUBLE, - i, i * ndoubles + j, 1, MPI_DOUBLE, - MPI_SUM, win); - } - } - } - fwq(calc_nsec); - FLUSH(win); -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int rc; - int actual; - int ppn = -1; - int nproc; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *wbuf, *rbuf, *result; - MPI_Win win; - struct timespec start, end; - long t_flush_l, t_pure_l, t_overall_l; - long t_flush, t_pure, t_overall; - int opt; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: MPI_THREAD_MULTIPLE not available (level was set to %d)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - /* accumulate-to buffer */ - wbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!wbuf) { printf("malloc failed"); goto fn_fail; } - memset(wbuf, 0, sizeof(double) * ndoubles * nproc); - - /* read-from buffer */ - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles * nproc); - - /* fetch-to buffer */ - result = malloc(sizeof(double) * ndoubles * nproc); - if(!result) { printf("malloc failed"); goto fn_fail; } - memset(result, 0, sizeof(double) * ndoubles * nproc); - - /* Expose accumulate-to buffer*/ - if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { - printf("MPI_Win_create failed,rc=%d\n", rc); - } - - //print_cpu_last_executed_on(); - - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); - rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); - result[i * ndoubles + j] = (i + 1) * 100000 + (j + 1); - } - } - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - printf("result,proc=%d,j=%d,val=%f\n", i, j, result[i * ndoubles + j]); - } - } -#endif - /* Measure flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NFENCE 10 - BEGIN_EPOCH(win); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - for (i = 0; i < NFENCE; i++) { - FLUSH(win); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - END_EPOCH(win); - t_flush_l = DIFFNSEC(end, start) / NFENCE; - //printf("t_flush (local): %ld usec\n", t_flush_l / 1000UL); - MPI_Allreduce(&t_flush_l, &t_flush, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_flush (max): %ld usec\n", t_flush / 1000UL); - - /* Measure get_acc-flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NPURE 10 - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - for (i = 0; i < NPURE; i++) { - BEGIN_EPOCH(win); - rma(nproc, ppn, my_rank, wbuf, rbuf, result, ndoubles, win, 0); - END_EPOCH(win); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld usec\n", t_pure / 1000UL); - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - printf("result,proc=%d,j=%d,val=%f\n", i, j, result[i * ndoubles + j]); - } - } -#endif - - /* Measure get_acc-calc-flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 10 - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - for (i = 0; i < NOVERALL; i++) { - BEGIN_EPOCH(win); - rma(nproc, ppn, my_rank, wbuf, rbuf, result, ndoubles, win, t_pure - t_flush); - END_EPOCH(win); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_overall_l = DIFFNSEC(end, start) / NOVERALL; - //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld usec\n", t_overall / 1000UL); - if (my_rank == 0) { - long t_abs = (t_pure * 2) - t_overall; - printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); -} - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while (0) +#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while (0) +#define FLUSH(win) do { MPI_Win_flush_local_all(win); } while (0) + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* get_acc-calc-flush_local */ +void rma(int nproc, int ppn, int rank, double *wbuf, double *rbuf, + double *result, int ndoubles, MPI_Win win, long calc_nsec) +{ + int i, j; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + for (j = 0; j < ndoubles; j++) { +#if 0 + printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", + i, j, rbuf[i * ndoubles + j], + wbuf[i * ndoubles + j]); +#endif + MPI_Get_accumulate(rbuf + i * ndoubles + j, 1, + MPI_DOUBLE, + result + i * ndoubles + j, + 1, MPI_DOUBLE, + i, i * ndoubles + j, 1, + MPI_DOUBLE, + MPI_SUM, win); + } + } + } + fwq(calc_nsec); + FLUSH(win); +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int rc; + int actual; + int ppn = -1; + int nproc; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *wbuf, *rbuf, *result; + MPI_Win win; + struct timespec start, end; + long t_flush_l, t_pure_l, t_overall_l; + long t_flush, t_pure, t_overall; + int opt; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: MPI_THREAD_MULTIPLE not available " + "(level was set to %d)\n", actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + /* accumulate-to buffer */ + wbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!wbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(wbuf, 0, sizeof(double) * ndoubles * nproc); + + /* read-from buffer */ + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles * nproc); + + /* fetch-to buffer */ + result = malloc(sizeof(double) * ndoubles * nproc); + if (!result) { + printf("malloc failed"); + goto fn_fail; + } + memset(result, 0, sizeof(double) * ndoubles * nproc); + + /* Expose accumulate-to buffer*/ + if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, + sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, + &win)) { + printf("MPI_Win_create failed,rc=%d\n", rc); + } + + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); + rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); + result[i * ndoubles + j] = (i + 1) * 100000 + (j + 1); + } + } + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + printf("result,proc=%d,j=%d,val=%f\n", + i, j, result[i * ndoubles + j]); + } + } +#endif + /* Measure flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NFENCE 10 + BEGIN_EPOCH(win); + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + for (i = 0; i < NFENCE; i++) { + FLUSH(win); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + END_EPOCH(win); + t_flush_l = DIFFNSEC(end, start) / NFENCE; + //printf("t_flush (local): %ld usec\n", t_flush_l / 1000UL); + MPI_Allreduce(&t_flush_l, &t_flush, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_flush (max): %ld usec\n", t_flush / 1000UL); + + /* Measure get_acc-flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NPURE 10 + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + for (i = 0; i < NPURE; i++) { + BEGIN_EPOCH(win); + rma(nproc, ppn, my_rank, wbuf, rbuf, result, ndoubles, win, 0); + END_EPOCH(win); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld usec\n", t_pure / 1000UL); + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + printf("result,proc=%d,j=%d,val=%f\n", + i, j, result[i * ndoubles + j]); + } + } +#endif + + /* Measure get_acc-calc-flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 10 + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + for (i = 0; i < NOVERALL; i++) { + BEGIN_EPOCH(win); + rma(nproc, ppn, my_rank, wbuf, rbuf, result, ndoubles, win, + t_pure - t_flush); + END_EPOCH(win); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_overall_l = DIFFNSEC(end, start) / NOVERALL; + //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld usec\n", t_overall / 1000UL); + if (my_rank == 0) { + long t_abs = (t_pure * 2) - t_overall; + + printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/013.c b/test/uti/mpi/013.c index 0f3bc2b1..09b5e17b 100755 --- a/test/uti/mpi/013.c +++ b/test/uti/mpi/013.c @@ -1,335 +1,245 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while(0) -#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while(0) - - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -double nspw; /* nsec per work */ -unsigned long nsec; - -void fwq_init() { - struct timespec start, end; - int i; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - nsec = DIFFNSEC(end, start); - nspw = nsec / (double)N_INIT; -} - -#if 0 -void fwq(long delay_nsec) { - if (delay_nsec < 0) { - return; - //printf("%s: delay_nsec < 0\n", __FUNCTION__); - } - bulk_fsw(delay_nsec / nspw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_nsec) { - struct timespec start, end; - - if (delay_nsec < 0) { return; } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - while (1) { - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on OFP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -static inline int on_same_node(int ppn, int me, int you) { - return (me / ppn == you / ppn); -} - -/* get_acc-calc-flush_local */ -void rma(int nproc, int ppn, int rank, double *wbuf, double *rbuf, int ndoubles, MPI_Win win, long calc_nsec, int flush_only) { - int i, j; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (!on_same_node(ppn, rank, i)) { - for (j = 0; j < ndoubles; j++) { - //printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", i, j, rbuf[i * ndoubles + j], wbuf[i * ndoubles + j]); - if (!flush_only) { - MPI_Accumulate(rbuf + i * ndoubles + j, 1, MPI_DOUBLE, - i, i * ndoubles + j, 1, MPI_DOUBLE, - MPI_SUM, win); - } - MPI_Win_flush_local(i, win); - } - } - } - fwq(calc_nsec); -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int rc; - int actual; - int ppn = -1; - int nproc; - int ndoubles = -1; - int my_rank = -1, size = -1; - int i, j; - double *wbuf, *rbuf; - MPI_Win win; - struct timespec start, end; - long t_flush_l, t_pure_l, t_overall_l; - long t_flush, t_pure, t_overall; - int opt; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = (1ULL << atoi(optarg)); - break; - case 'P': - ppn = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: MPI_THREAD_MULTIPLE not available (level was set to %d)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); - printf("nsec=%ld, nspw=%f\n", nsec, nspw); - } - - /* accumulate-to buffer */ - wbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!wbuf) { printf("malloc failed"); goto fn_fail; } - memset(wbuf, 0, sizeof(double) * ndoubles * nproc); - - /* read-from buffer */ - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles * nproc); - - /* Expose accumulate-to buffer*/ - if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { - printf("MPI_Win_create failed,rc=%d\n", rc); - } - - //print_cpu_last_executed_on(); - - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); - rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); - } - } - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - } - } -#endif - - /* Measure flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NFENCE 10 - BEGIN_EPOCH(win); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - for (i = 0; i < NFENCE; i++) { - rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0, 1); - } - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - END_EPOCH(win); - t_flush_l = DIFFNSEC(end, start) / NFENCE; - //printf("t_flush (local): %ld usec\n", t_flush_l / 1000UL); - MPI_Allreduce(&t_flush_l, &t_flush, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_flush (max): %ld usec\n", t_flush / 1000UL); - - /* Measure get_acc-flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NPURE 10 - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - //MPI_Pcontrol(1, "rma"); - for (i = 0; i < NPURE; i++) { - BEGIN_EPOCH(win); - rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0, 0); - END_EPOCH(win); - } - //MPI_Pcontrol(-1, "rma"); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld usec\n", t_pure / 1000UL); - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - } - } -#endif - - /* Measure get_acc-calc-flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 10 - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - //MPI_Pcontrol(1, "rma-calc"); - for (i = 0; i < NOVERALL; i++) { - BEGIN_EPOCH(win); - rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, t_pure - t_flush, 0); - END_EPOCH(win); - } - //MPI_Pcontrol(-1, "rma-calc"); - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - t_overall_l = DIFFNSEC(end, start) / NOVERALL; - //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld usec\n", t_overall / 1000UL); - if (my_rank == 0) { - long t_abs = (t_pure * 2) - t_overall; - printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); -} - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while (0) +#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while (0) + +static inline int on_same_node(int ppn, int me, int you) +{ + return (me / ppn == you / ppn); +} + +/* get_acc-calc-flush_local */ +void rma(int nproc, int ppn, int rank, double *wbuf, double *rbuf, + int ndoubles, MPI_Win win, long calc_nsec, int flush_only) +{ + int i, j; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (!on_same_node(ppn, rank, i)) { + for (j = 0; j < ndoubles; j++) { +#if 0 + printf("i=%d,j=%d,rbuf=%f,wbuf=%f\n", + i, j, rbuf[i * ndoubles + j], + wbuf[i * ndoubles + j]); +#endif + if (!flush_only) { + MPI_Accumulate(rbuf + i * ndoubles + j, + 1, MPI_DOUBLE, + i, i * ndoubles + j, 1, + MPI_DOUBLE, + MPI_SUM, win); + } + MPI_Win_flush_local(i, win); + } + } + } + fwq(calc_nsec); +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int rc; + int actual; + int ppn = -1; + int nproc; + int ndoubles = -1; + int my_rank = -1, size = -1; + int i, j; + double *wbuf, *rbuf; + MPI_Win win; + struct timespec start, end; + long t_flush_l, t_pure_l, t_overall_l; + long t_flush, t_pure, t_overall; + int opt; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:", options, NULL)) != -1) { + switch (opt) { + case 'd': + ndoubles = (1ULL << atoi(optarg)); + break; + case 'P': + ppn = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: MPI_THREAD_MULTIPLE not available " + "(level was set to %d)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("ndoubles=%d,nproc=%d\n", ndoubles, nproc); + printf("nsec=%ld, nspw=%f\n", nsec, nspw); + } + + /* accumulate-to buffer */ + wbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!wbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(wbuf, 0, sizeof(double) * ndoubles * nproc); + + /* read-from buffer */ + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles * nproc); + + /* Expose accumulate-to buffer*/ + if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, + sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, + &win)) { + printf("MPI_Win_create failed,rc=%d\n", rc); + } + + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); + rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); + } + } + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + } + } +#endif + + /* Measure flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NFENCE 10 + BEGIN_EPOCH(win); + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + for (i = 0; i < NFENCE; i++) { + rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0, 1); + } + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + END_EPOCH(win); + t_flush_l = DIFFNSEC(end, start) / NFENCE; + //printf("t_flush (local): %ld usec\n", t_flush_l / 1000UL); + MPI_Allreduce(&t_flush_l, &t_flush, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_flush (max): %ld usec\n", t_flush / 1000UL); + + /* Measure get_acc-flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NPURE 10 + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + //MPI_Pcontrol(1, "rma"); + for (i = 0; i < NPURE; i++) { + BEGIN_EPOCH(win); + rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, 0, 0); + END_EPOCH(win); + } + //MPI_Pcontrol(-1, "rma"); + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld usec\n", t_pure / 1000UL); + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + } + } +#endif + + /* Measure get_acc-calc-flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 10 + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + //MPI_Pcontrol(1, "rma-calc"); + for (i = 0; i < NOVERALL; i++) { + BEGIN_EPOCH(win); + rma(nproc, ppn, my_rank, wbuf, rbuf, ndoubles, win, + t_pure - t_flush, 0); + END_EPOCH(win); + } + //MPI_Pcontrol(-1, "rma-calc"); + clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + t_overall_l = DIFFNSEC(end, start) / NOVERALL; + //printf("t_overall (local): %ld usec\n", t_overall_l / 1000UL); + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld usec\n", + t_overall / 1000UL); + if (my_rank == 0) { + long t_abs = (t_pure * 2) - t_overall; + + printf("overlap: %.2f %%\n", (t_abs * 100) / (double)t_pure); + } + + fn_exit: + MPI_Finalize(); + return 0; + fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/014.c b/test/uti/mpi/014.c index 6fa95045..1a4c3aa6 100755 --- a/test/uti/mpi/014.c +++ b/test/uti/mpi/014.c @@ -1,242 +1,278 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include -#include -#include -#include "async_progress.h" -#include "util.h" - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -static struct option options[] = { - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int rc; - int actual; - int nproc; - int nsamples = -1; - int my_rank = -1, size = -1; - int i, j, k, l, m; - double *wbuf, *rbuf, *result; - MPI_Win win; - long start, end; - long t_pure_l, t_pure, t_pure0 = 0; - int opt; - int szbuf = 8; - struct rusage ru_start, ru_end; - struct timeval tv_start, tv_end; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+n:", options, NULL)) != -1) { - switch (opt) { - case 'n': - nsamples = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (nsamples == -1) { - printf("specify nsamples with -n"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: MPI_THREAD_MULTIPLE not available (level was set to %d)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("nsamples=%d,nproc=%d\n", nsamples, nproc); - } - - /* accumulate-to buffer */ - wbuf = malloc(sizeof(double) * szbuf); - if(!wbuf) { printf("malloc failed"); goto fn_fail; } - memset(wbuf, 0, sizeof(double) * szbuf); - - /* read-from buffer */ - rbuf = malloc(sizeof(double) * szbuf); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * szbuf); - - /* fetch-to buffer */ - result = malloc(sizeof(double) * szbuf); - if(!result) { printf("malloc failed"); goto fn_fail; } - memset(result, 0, sizeof(double) * szbuf); - - /* Expose accumulate-to buffer*/ - if (rc = MPI_Win_create(wbuf, sizeof(double) * szbuf, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { - printf("MPI_Win_create failed,rc=%d\n", rc); - } - - for (j = 0; j < szbuf; j++) { - wbuf[j] = j + 1; - rbuf[j] = 10000 + j + 1; - result[j] = 100000 + j + 1; - } - -#if 0 - for (j = 0; j < szbuf; j++) { - printf("wbuf,j=%d,val=%f\n", j, wbuf[j]); - printf("rbuf,j=%d,val=%f\n", j, rbuf[j]); - printf("result,j=%d,val=%f\n", j, result[j]); - } - } -#endif - - for (k = 0; k < 2; k++) { - - if (k == 1) { - - print_cpu_last_executed_on("main"); - - INIT_ASYNC_THREAD_(); - - if ((rc = getrusage(RUSAGE_THREAD, &ru_start))) { - printf("%s: ERROR: getrusage failed (%d)\n", __FUNCTION__, rc); - } - - if ((rc = gettimeofday(&tv_start, NULL))) { - printf("%s: ERROR: gettimeofday failed (%d)\n", __FUNCTION__, rc); - } - - syscall(701, 1 | 2 | 0x80000000); - } - - for (m = 0; m < 3; m++) { - - for (l = 0; l <= 10; l++) { - long calc_cyc = /*(k == 1 && l == 0) ? (double)t_pure0 * 0.1 :*/ t_pure0 / 10 * l; - - MPI_Barrier(MPI_COMM_WORLD); - MPI_Win_lock_all(0, win); - //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - - start = rdtsc_light(); - for (j = 0; j < nsamples; j++) { - for (i = 0; i < nproc; i++) { - int target = j % nproc; - if (target == my_rank) { - continue; - } -#if 0 - MPI_Get_accumulate(rbuf + j % szbuf, 1, MPI_DOUBLE, - result + j % szbuf, 1, MPI_DOUBLE, - i, - j % szbuf, 1, MPI_DOUBLE, - MPI_SUM, win); -#endif -#if 1 - MPI_Get_accumulate(rbuf, szbuf, MPI_DOUBLE, - result, szbuf, MPI_DOUBLE, - i, - 0, szbuf, MPI_DOUBLE, - MPI_SUM, win); -#endif -#if 0 - MPI_Accumulate(rbuf, szbuf, MPI_DOUBLE, - i, - 0, szbuf, MPI_DOUBLE, - MPI_SUM, win); -#endif -#if 0 - MPI_Get(rbuf + j % szbuf, 1, MPI_DOUBLE, - i, - j % szbuf, 1, MPI_DOUBLE, - win); -#endif - } - } - fwq(calc_cyc * nsamples); - MPI_Win_flush_local_all(win); - end = rdtsc_light(); - - //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - MPI_Win_unlock_all(win); - MPI_Barrier(MPI_COMM_WORLD); - t_pure_l = (end - start) / nsamples; - //t_pure_l = DIFFNSEC(end, start) / nsamples; - - if (1||m == 2) { - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) { - if (l == 0) { - printf("async: %d, trial: %d\n", k, m); - } - if (k == 0) { - printf("%ld\t%ld\n", calc_cyc, t_pure); - } else { - printf("%ld\n", t_pure); - } - } - } - - if (k == 0 && l == 0) { - t_pure0 = t_pure; - } -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < sbuf; j++) { - printf("wbuf,j=%d,val=%f\n", j, wbuf[j]); - printf("rbuf,j=%d,val=%f\n", j, rbuf[j]); - printf("result,j=%d,val=%f\n", j, result[j]); - } - } -#endif - } - } - - if (k == 1) { - FINALIZE_ASYNC_THREAD_(); - -#if 0 - if ((rc = getrusage(RUSAGE_THREAD, &ru_end))) { - printf("%s: ERROR: getrusage failed (%d)\n", __FUNCTION__, rc); - } - - if ((rc = gettimeofday(&tv_end, NULL))) { - printf("%s: ERROR: gettimeofday failed (%d)\n", __FUNCTION__, rc); - } - - printf("%s: wall: %ld, user: %ld, sys: %ld\n", __FUNCTION__, - DIFFUSEC(tv_end, tv_start), - DIFFUSEC(ru_end.ru_utime, ru_start.ru_utime), - DIFFUSEC(ru_end.ru_stime, ru_start.ru_stime)); - syscall(701, 4 | 8 | 0x80000000); -#endif - } - } - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include +#include +#include "async_progress.h" +#include "util.h" +#include "fwq.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +static struct option options[] = { + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int rc; + int actual; + int nproc; + int nsamples = -1; + int my_rank = -1, size = -1; + int i, j, k, l, m; + double *wbuf, *rbuf, *result; + MPI_Win win; + long start, end; + long t_pure_l, t_pure, t_pure0 = 0; + int opt; + int szbuf = 8; + struct rusage ru_start, ru_end; + struct timeval tv_start, tv_end; + + fwq_init(); + + while ((opt = getopt_long(argc, argv, "+n:", options, NULL)) != -1) { + switch (opt) { + case 'n': + nsamples = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (nsamples == -1) { + printf("specify nsamples with -n"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: MPI_THREAD_MULTIPLE not available " + "(level was set to %d)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("nsamples=%d,nproc=%d\n", nsamples, nproc); + } + + /* accumulate-to buffer */ + wbuf = malloc(sizeof(double) * szbuf); + if (!wbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(wbuf, 0, sizeof(double) * szbuf); + + /* read-from buffer */ + rbuf = malloc(sizeof(double) * szbuf); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * szbuf); + + /* fetch-to buffer */ + result = malloc(sizeof(double) * szbuf); + if (!result) { + printf("malloc failed"); + goto fn_fail; + } + memset(result, 0, sizeof(double) * szbuf); + + /* Expose accumulate-to buffer*/ + if (rc = MPI_Win_create(wbuf, sizeof(double) * szbuf, sizeof(double), + MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { + printf("MPI_Win_create failed,rc=%d\n", rc); + } + + for (j = 0; j < szbuf; j++) { + wbuf[j] = j + 1; + rbuf[j] = 10000 + j + 1; + result[j] = 100000 + j + 1; + } + +#if 0 + for (j = 0; j < szbuf; j++) { + printf("wbuf,j=%d,val=%f\n", j, wbuf[j]); + printf("rbuf,j=%d,val=%f\n", j, rbuf[j]); + printf("result,j=%d,val=%f\n", j, result[j]); + } +#endif + + for (k = 0; k < 2; k++) { + + if (k == 1) { + + print_cpu_last_executed_on("main"); + + INIT_ASYNC_THREAD_(); + + if ((rc = getrusage(RUSAGE_THREAD, &ru_start))) { + printf("%s: ERROR: getrusage failed (%d)\n", + __func__, rc); + } + + if ((rc = gettimeofday(&tv_start, NULL))) { + printf("%s: ERROR: gettimeofday failed (%d)\n", + __func__, rc); + } + + syscall(701, 1 | 2 | 0x80000000); + } + + for (m = 0; m < 3; m++) { + + for (l = 0; l <= 10; l++) { +#if 0 + long calc_cyc = (k == 1 && l == 0) ? + (double)t_pure0 * 0.1 : + t_pure0 / 10 * l; +#else + long calc_cyc = t_pure0 / 10 * l; +#endif + MPI_Barrier(MPI_COMM_WORLD); + MPI_Win_lock_all(0, win); + //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + + start = rdtsc_light(); + for (j = 0; j < nsamples; j++) { + for (i = 0; i < nproc; i++) { + int target = j % nproc; + + if (target == my_rank) { + continue; + } +#if 0 + MPI_Get_accumulate(rbuf + j % szbuf, 1, + MPI_DOUBLE, + result + j % szbuf, + 1, MPI_DOUBLE, + i, + j % szbuf, 1, + MPI_DOUBLE, + MPI_SUM, win); +#endif +#if 1 + MPI_Get_accumulate(rbuf, szbuf, + MPI_DOUBLE, + result, szbuf, + MPI_DOUBLE, + i, + 0, szbuf, + MPI_DOUBLE, + MPI_SUM, win); +#endif +#if 0 + MPI_Accumulate(rbuf, szbuf, MPI_DOUBLE, + i, + 0, szbuf, MPI_DOUBLE, + MPI_SUM, win); +#endif +#if 0 + MPI_Get(rbuf + j % szbuf, 1, + MPI_DOUBLE, i, + j % szbuf, 1, MPI_DOUBLE, + win); +#endif + } + } + fwq(calc_cyc * nsamples); + MPI_Win_flush_local_all(win); + end = rdtsc_light(); + + //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + MPI_Win_unlock_all(win); + MPI_Barrier(MPI_COMM_WORLD); + t_pure_l = (end - start) / nsamples; + //t_pure_l = DIFFNSEC(end, start) / nsamples; + + if (1 || m == 2) { + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, + MPI_MAX, MPI_COMM_WORLD); + if (my_rank == 0) { + if (l == 0) { + printf("async: %d, trial: %d\n", + k, m); + } + if (k == 0) { + printf("%ld\t%ld\n", + calc_cyc, t_pure); + } else { + printf("%ld\n", t_pure); + } + } + } + + if (k == 0 && l == 0) { + t_pure0 = t_pure; + } +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < sbuf; j++) { + printf("wbuf,j=%d,val=%f\n", + j, wbuf[j]); + printf("rbuf,j=%d,val=%f\n", + j, rbuf[j]); + printf("result,j=%d,val=%f\n", + j, result[j]); + } + } +#endif + } + } + + if (k == 1) { + FINALIZE_ASYNC_THREAD_(); + +#if 0 + if ((rc = getrusage(RUSAGE_THREAD, &ru_end))) { + printf("%s: ERROR: getrusage failed (%d)\n", + __func__, rc); + } + + if ((rc = gettimeofday(&tv_end, NULL))) { + printf("%s: ERROR: gettimeofday failed (%d)\n", + __func__, rc); + } + + printf("%s: wall: %ld, user: %ld, sys: %ld\n", + __func__, + DIFFUSEC(tv_end, tv_start), + DIFFUSEC(ru_end.ru_utime, ru_start.ru_utime), + DIFFUSEC(ru_end.ru_stime, ru_start.ru_stime)); + syscall(701, 4 | 8 | 0x80000000); +#endif + } + } + +fn_exit: + MPI_Finalize(); + return 0; +fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/015.c b/test/uti/mpi/015.c index cde43202..326fa0c6 100755 --- a/test/uti/mpi/015.c +++ b/test/uti/mpi/015.c @@ -1,346 +1,241 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include "async_progress.h" - -//#define DEBUG -#ifdef DEBUG -#define dprintf printf -#else -#define dprintf {} -#endif - -#define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) - -#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while(0) -#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while(0) - -static inline uint64_t rdtsc_light(void ) -{ - uint64_t x; - __asm__ __volatile__("rdtscp;" /* rdtscp don't jump over earlier instructions */ - "shl $32, %%rdx;" - "or %%rdx, %%rax" : - "=a"(x) : - : - "%rcx", "%rdx", "memory"); - return x; -} - -static inline void fixed_size_work() { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); -} - -static inline void bulk_fsw(unsigned long n) { - int j; - for (j = 0; j < (n); j++) { - fixed_size_work(); - } -} - -long cyc, cycpw; /* cycles per work */ - -void fwq_init() { - long start, end; - int i; - start = rdtsc_light(); -#define N_INIT 10000000 - bulk_fsw(N_INIT); - end = rdtsc_light(); - cyc = end - start; - cycpw = cyc / (double)N_INIT; -} - -#if 0 -void fwq(long delay_cyc) { - if (delay_cyc < 0) { - return; - //printf("%s: delay_cyc < 0\n", __FUNCTION__); - } - bulk_fsw(delay_cyc / cycpw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void fwq(long delay_cyc) { - long start, end; - - if (delay_cyc < 0) { return; } - start = rdtsc_light(); - - while (1) { - end = rdtsc_light(); - if (end - start >= delay_cyc) { - break; - } - bulk_fsw(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -static int print_cpu_last_executed_on() { - char fn[256]; - char* result; - pid_t tid = syscall(SYS_gettid); - int fd; - int offset; - int mpi_errno = 0; - - sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); - //printf("fn=%s\n", fn); - fd = open(fn, O_RDONLY); - if(fd == -1) { - printf("open() failed\n"); - goto fn_fail; - } - - result = malloc(65536); - if(result == NULL) { - printf("malloc() failed"); - goto fn_fail; - } - - int amount = 0; - offset = 0; - while(1) { - amount = read(fd, result + offset, 65536); - // printf("amount=%d\n", amount); - if(amount == -1) { - printf("read() failed"); - goto fn_fail; - } - if(amount == 0) { - goto eof; - } - offset += amount; - } - eof:; - //printf("result:%s\n", result); - - char* next_delim = result; - char* field; - int i; - for(i = 0; i < 39; i++) { - field = strsep(&next_delim, " "); - } - - int cpu = sched_getcpu(); - if(cpu == -1) { - printf("getpu() failed\n"); - goto fn_fail; - } - - printf("compute thread,pmi_rank=%02d,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", atoi(getenv("PMI_RANK")), atoi(field), cpu, tid); fflush(stdout); - fn_exit: - free(result); - return mpi_errno; - fn_fail: - mpi_errno = -1; - goto fn_exit; -} - -/* ga_acc per rank:ga_sync=40:1 */ -void rma(int nproc, int my_rank, double *wbuf, double *rbuf, int ndoubles, MPI_Win win, long calc_nsec) { - int i, j; - int r = 0, s = 0; - int req = 0; - for (i = 0; i < nproc; i++) { - if (i != my_rank) { - for (j = 0; j < ndoubles; j++) { - MPI_Accumulate(rbuf + i * ndoubles + j, 1, MPI_DOUBLE, - i, i * ndoubles + j, 1, MPI_DOUBLE, - MPI_SUM, win); - MPI_Win_flush_local(i, win); /* ga_acc() calls flush_local() immediately */ - } - } - } - fwq(calc_nsec); -} - -static struct option options[] = { - { - .name = "ppn", - .has_arg = required_argument, - .flag = NULL, - .val = 'P', - }, - /* end */ - { NULL, 0, NULL, 0, }, -}; - -int main(int argc, char **argv) { - int rc; - int actual; - int ppn = -1; - int nproc; - int ndoubles = -1; - double add_rate = 1.0; - int my_rank = -1, size = -1; - int i, j, k, l; - double *wbuf, *rbuf, *result; - MPI_Win win; - long start, end; - //struct timespec start, end; - long t_pure_l, t_overall_l; - long t_pure, t_overall; - int opt; - - fwq_init(); - - while ((opt = getopt_long(argc, argv, "+d:P:R:", options, NULL)) != -1) { - switch (opt) { - case 'd': - ndoubles = atoi(optarg); - break; - case 'P': - ppn = atoi(optarg); - break; - case 'R': - add_rate = atof(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - exit(1); - } - } - - if (ndoubles == -1 || ppn == -1) { - printf("specify ndoubles with -d and ppn with --ppn"); - exit(1); - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != 3) { - printf("ERROR: MPI_THREAD_MULTIPLE not available (level was set to %d)\n", actual); - exit(1); - } - - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (my_rank == 0) { - printf("ndoubles=%d,nproc=%d,add_rate=%f\n", ndoubles, nproc, add_rate); - printf("cyc=%ld, cycpw=%ld\n", cyc, cycpw); - } - - /* accumulate-to buffer */ - wbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!wbuf) { printf("malloc failed"); goto fn_fail; } - memset(wbuf, 0, sizeof(double) * ndoubles * nproc); - - /* read-from buffer */ - rbuf = malloc(sizeof(double) * ndoubles * nproc); - if(!rbuf) { printf("malloc failed"); goto fn_fail; } - memset(rbuf, 0, sizeof(double) * ndoubles * nproc); - - /* Expose accumulate-to buffer*/ - if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win)) { - printf("MPI_Win_create failed,rc=%d\n", rc); - } - - //print_cpu_last_executed_on(); - - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); - rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); - } - } - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - } - } -#endif - - for (k = 0; k < 2; k++) { - if (k == 1) { - INIT_ASYNC_THREAD_(); - } - - /* Measure get_acc-flush time */ - MPI_Barrier(MPI_COMM_WORLD); -#define NPURE 10 - //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); - start = rdtsc_light(); - MPI_Pcontrol(1, "rma"); - syscall(701, 1); - syscall(701, 2); - for (i = 0; i < NPURE; i++) { - BEGIN_EPOCH(win); - rma(nproc, my_rank, wbuf, rbuf, ndoubles, win, 0); - END_EPOCH(win); - } - MPI_Pcontrol(-1, "rma"); - syscall(701, 4); - syscall(701, 8); - end = rdtsc_light(); - //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); - MPI_Barrier(MPI_COMM_WORLD); - t_pure_l = (end - start) / NPURE; - //t_pure_l = DIFFNSEC(end, start) / NPURE; - //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); - MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_pure (max): %ld cycles\n", t_pure); - - -#if 1 - for (l = 1; l <= 10; l++) { - MPI_Barrier(MPI_COMM_WORLD); -#define NOVERALL 10 - start = rdtsc_light(); - for (i = 0; i < NOVERALL; i++) { - BEGIN_EPOCH(win); - rma(nproc, my_rank, wbuf, rbuf, ndoubles, win, 100UL * 1000000 * l); - END_EPOCH(win); - } - end = rdtsc_light(); - MPI_Barrier(MPI_COMM_WORLD); - t_overall_l = (end - start) / NOVERALL; - MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, MPI_MAX, MPI_COMM_WORLD); - if (my_rank == 0) printf("t_overall (max): %ld cycle\n", t_overall); - } -#endif - - if (k == 1) { - FINALIZE_ASYNC_THREAD_(); - } - -#if 0 - for (i = 0; i < nproc; i++) { - for (j = 0; j < ndoubles; j++) { - printf("wbuf,proc=%d,j=%d,val=%f\n", i, j, wbuf[i * ndoubles + j]); - printf("rbuf,proc=%d,j=%d,val=%f\n", i, j, rbuf[i * ndoubles + j]); - printf("result,proc=%d,j=%d,val=%f\n", i, j, result[i * ndoubles + j]); - } - } -#endif - } - - fn_exit: - MPI_Finalize(); - return 0; - fn_fail: - goto fn_exit; -} +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include "async_progress.h" +#include "util.h" +#include "delay.h" + +//#define DEBUG +#ifdef DEBUG +#define dprintf printf +#else +#define dprintf {} +#endif + +#define BEGIN_EPOCH(win) do { MPI_Win_lock_all(0, win); } while (0) +#define END_EPOCH(win) do { MPI_Win_unlock_all(win); } while (0) + +/* ga_acc per rank:ga_sync=40:1 */ +void rma(int nproc, int my_rank, double *wbuf, double *rbuf, int ndoubles, + MPI_Win win, long calc_nsec) +{ + int i, j; + int r = 0, s = 0; + int req = 0; + + for (i = 0; i < nproc; i++) { + if (i != my_rank) { + for (j = 0; j < ndoubles; j++) { + MPI_Accumulate(rbuf + i * ndoubles + j, 1, + MPI_DOUBLE, i, i * ndoubles + j, + 1, MPI_DOUBLE, MPI_SUM, win); + /* ga_acc() calls flush_local() immediately */ + MPI_Win_flush_local(i, win); + } + } + } + cdelay(calc_nsec); +} + +static struct option options[] = { + { + .name = "ppn", + .has_arg = required_argument, + .flag = NULL, + .val = 'P', + }, + /* end */ + { NULL, 0, NULL, 0, }, +}; + +int main(int argc, char **argv) +{ + int rc; + int actual; + int ppn = -1; + int nproc; + int ndoubles = -1; + double add_rate = 1.0; + int my_rank = -1, size = -1; + int i, j, k, l; + double *wbuf, *rbuf, *result; + MPI_Win win; + long start, end; + //struct timespec start, end; + long t_pure_l, t_overall_l; + long t_pure, t_overall; + int opt; + + cdelay_init(); + + while ((opt = getopt_long(argc, argv, "+d:P:R:", options, NULL)) + != -1) { + switch (opt) { + case 'd': + ndoubles = atoi(optarg); + break; + case 'P': + ppn = atoi(optarg); + break; + case 'R': + add_rate = atof(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + exit(1); + } + } + + if (ndoubles == -1 || ppn == -1) { + printf("specify ndoubles with -d and ppn with --ppn"); + exit(1); + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != 3) { + printf("ERROR: MPI_THREAD_MULTIPLE not available " + "(level was set to %d)\n", + actual); + exit(1); + } + + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (my_rank == 0) { + printf("ndoubles=%d,nproc=%d,add_rate=%f\n", + ndoubles, nproc, add_rate); + printf("cyc=%ld, cycpw=%ld\n", cyc, cycpw); + } + + /* accumulate-to buffer */ + wbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!wbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(wbuf, 0, sizeof(double) * ndoubles * nproc); + + /* read-from buffer */ + rbuf = malloc(sizeof(double) * ndoubles * nproc); + if (!rbuf) { + printf("malloc failed"); + goto fn_fail; + } + memset(rbuf, 0, sizeof(double) * ndoubles * nproc); + + /* Expose accumulate-to buffer*/ + if (rc = MPI_Win_create(wbuf, sizeof(double) * ndoubles * nproc, + sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, + &win)) { + printf("MPI_Win_create failed,rc=%d\n", rc); + } + + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + wbuf[i * ndoubles + j] = (i + 1) * 1000 + (j + 1); + rbuf[i * ndoubles + j] = (i + 1) * 10000 + (j + 1); + } + } + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + } + } +#endif + + for (k = 0; k < 2; k++) { + if (k == 1) { + INIT_ASYNC_THREAD_(); + } + + /* Measure get_acc-flush time */ + MPI_Barrier(MPI_COMM_WORLD); +#define NPURE 10 + //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start); + start = rdtsc_light(); + MPI_Pcontrol(1, "rma"); + syscall(701, 1); + syscall(701, 2); + for (i = 0; i < NPURE; i++) { + BEGIN_EPOCH(win); + rma(nproc, my_rank, wbuf, rbuf, ndoubles, win, 0); + END_EPOCH(win); + } + MPI_Pcontrol(-1, "rma"); + syscall(701, 4); + syscall(701, 8); + end = rdtsc_light(); + //clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end); + MPI_Barrier(MPI_COMM_WORLD); + t_pure_l = (end - start) / NPURE; + //t_pure_l = DIFFNSEC(end, start) / NPURE; + //printf("t_pure (local): %ld usec\n", t_pure_l / 1000UL); + MPI_Allreduce(&t_pure_l, &t_pure, 1, MPI_LONG, MPI_MAX, + MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_pure (max): %ld cycles\n", t_pure); + + +#if 1 + for (l = 1; l <= 10; l++) { + MPI_Barrier(MPI_COMM_WORLD); +#define NOVERALL 10 + start = rdtsc_light(); + for (i = 0; i < NOVERALL; i++) { + BEGIN_EPOCH(win); + rma(nproc, my_rank, wbuf, rbuf, ndoubles, win, + 100UL * 1000000 * l); + END_EPOCH(win); + } + end = rdtsc_light(); + MPI_Barrier(MPI_COMM_WORLD); + t_overall_l = (end - start) / NOVERALL; + MPI_Allreduce(&t_overall_l, &t_overall, 1, MPI_LONG, + MPI_MAX, MPI_COMM_WORLD); + if (my_rank == 0) + printf("t_overall (max): %ld cycle\n", + t_overall); + } +#endif + + if (k == 1) { + FINALIZE_ASYNC_THREAD_(); + } + +#if 0 + for (i = 0; i < nproc; i++) { + for (j = 0; j < ndoubles; j++) { + printf("wbuf,proc=%d,j=%d,val=%f\n", + i, j, wbuf[i * ndoubles + j]); + printf("rbuf,proc=%d,j=%d,val=%f\n", + i, j, rbuf[i * ndoubles + j]); + printf("result,proc=%d,j=%d,val=%f\n", + i, j, result[i * ndoubles + j]); + } + } +#endif + } + +fn_exit: + MPI_Finalize(); + return 0; +fn_fail: + goto fn_exit; +} diff --git a/test/uti/mpi/016.c b/test/uti/mpi/016.c index fc83c198..a4682b5d 100755 --- a/test/uti/mpi/016.c +++ b/test/uti/mpi/016.c @@ -1,349 +1,419 @@ -#define _GNU_SOURCE /* See feature_test_macros(7) */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* For SYS_xxx definitions */ -#include -#include -#include -#include -#include "async_progress.h" -#include "util.h" - -#define MYTIME_UNIT "usec" -#define MYTIME_TOUSEC 1000000 -#define MYTIME_TONSEC 1000000000 - -#define NROW 16 /* 0%, 10%, ..., 140% */ -#define NCOL 4 - -#define NSAMPLES_DROP 5/*10*/ -#define NSAMPLES_COMM 10/*20*/ -#define NSAMPLES_TOTAL 10/*20*/ -#define NSAMPLES_INNER 5 - -#define PROGRESS_CALC_PHASE_ONLY - -static inline double mytime() { - return /*rdtsc_light()*/MPI_Wtime(); -} - -static int ppn = -1; - -void init_buf(double *origin_buf, double *result, double *target_buf, int szbuf, int rank, int id) { - int j; - for (j = 0; j < szbuf; j++) { - origin_buf[j] = (rank + 1) * 100.0 + (j + 1); - result[j] = (id + 1) * 100000000.0 + (rank + 1) * 10000.0 + (j + 1); - target_buf[j] = (rank + 1) * 1000000.0 + (j + 1); - } -} - -void pr_buf(double *origin_buf, double *result, double *target_buf, int szbuf, int rank, int nproc) { - int i, j; - for (i = 0; i < nproc; i++) { - MPI_Barrier(MPI_COMM_WORLD); - - if (i != rank) { - usleep(100000); - continue; - } - - for (j = 0; j < szbuf; j++) { - pr_debug("[%d] origin_buf,j=%d,val=%f\n", rank, j, origin_buf[j]); - pr_debug("[%d] result,j=%d,val=%f\n", rank, j, result[j]); - pr_debug("[%d] target_buf,j=%d,val=%f\n", rank, j, target_buf[j]); - } - } -} - -void rma(int rank, int nproc, MPI_Win win, double *origin_buf, double *result, int szbuf, long nsec_calc, int async_progress, int sync_progress, double pct_calc) { - int i, j, target_rank; - int completed, ret; - - for (j = 0; j < NSAMPLES_INNER; j++) { - for (i = 1; i < nproc; i++) { - target_rank = (rank + i) % nproc; - - MPI_Get_accumulate(origin_buf, szbuf, MPI_DOUBLE, - result, szbuf, MPI_DOUBLE, - target_rank, - 0, szbuf, MPI_DOUBLE, - MPI_NO_OP, win); -#if 0 - if (sync_progress) { - if ((ret = MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &completed, MPI_STATUS_IGNORE)) != MPI_SUCCESS) { - pr_err("%s: error: MPI_Iprobe: %d\n", __func__, ret); - } - } -#endif - } - } - - if (async_progress) { -#ifdef PROGRESS_CALC_PHASE_ONLY - progress_start(); -#endif - } - - ndelay(nsec_calc); - - if (async_progress) { -#ifdef PROGRESS_CALC_PHASE_ONLY - progress_stop(); -#endif - } - -#define MAX2(x,y) ((x) > (y) ? (x) : (y)) - -#if 1 - /* iprobe is 10 times faster than win_flush_local_all, - 20679 usec / (8*63*5) messages for 8-ppn 8-node case */ - if (1/*!sync_progress*/) - for (j = 0; j < (async_progress ? MAX2(NSAMPLES_INNER * (nproc - 1) * (1.0 - pct_calc), nproc - 1) : NSAMPLES_INNER * (nproc - 1)); j++) { - //for (j = 0; j < MAX2(NSAMPLES_INNER * (nproc - 1) * (1.0 - pct_calc), nproc - 1); j++) { - if ((ret = MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &completed, MPI_STATUS_IGNORE)) != MPI_SUCCESS) { - pr_err("%s: error: MPI_Iprobe: %d\n", __func__, ret); - } - } -#endif - - MPI_Win_flush_local_all(win); -} - -double measure(int rank, int nproc, MPI_Win win, double *origin_buf, double* result, double *target_buf, int szbuf, long nsec_calc, int async_progress, int sync_progress, int nsamples, int nsamples_drop, double pct_calc) { - int i; - double t_l, t_g, t_sum = 0; - double start, end; - - for (i = 0; i < nsamples + nsamples_drop; i++) { - MPI_Barrier(MPI_COMM_WORLD); - MPI_Win_lock_all(0, win); - - /* Set parameter based on current IPC and frequency */ - ndelay_init(0); - - start = mytime(); - rma(rank, nproc, win, origin_buf, result, szbuf, nsec_calc, async_progress, sync_progress, pct_calc); - end = mytime(); - - MPI_Win_unlock_all(win); - MPI_Barrier(MPI_COMM_WORLD); - - t_l = end - start; - MPI_Allreduce(&t_l, &t_g, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - - if (i < nsamples_drop) { - continue; - } - - t_sum += t_g; - } - return t_sum / nsamples; -} - -int main(int argc, char **argv) -{ - int ret; - int actual; - int rank = -1; - int nproc; - int i, j, progress, l, m; - double *target_buf, *origin_buf, *result; - MPI_Win win; - double t_comm_l, t_comm_g, t_comm_sum, t_comm_ave; - double t_total_l, t_total_g, t_total_sum, t_total_ave; - double t_table[NROW][NCOL]; - int opt; - int szbuf = 1; /* Number of doubles to send */ - struct rusage ru_start, ru_end; - struct timeval tv_start, tv_end; - int disable_syscall_intercept = 0; - - cpu_set_t cpuset; - - //test_set_loglevel(TEST_LOGLEVEL_WARN); - ndelay_init(1); - - while ((opt = getopt(argc, argv, "+p:I:")) != -1) { - switch (opt) { - case 'p': - ppn = atoi(optarg); - break; - case 'I': - disable_syscall_intercept = atoi(optarg); - break; - default: /* '?' */ - printf("unknown option %c\n", optopt); - ret = -1; - goto out; - } - } - - if (ppn == -1) { - pr_err("Error: Specify processes-per-rank with -p"); - ret = -1; - goto out; - } - - MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); - if (actual != MPI_THREAD_MULTIPLE) { - pr_err("Error: MPI_THREAD_MULTIPLE is not available\n"); - ret = -1; - goto out; - } - - MPI_Comm_rank(MPI_COMM_WORLD, &rank); - MPI_Comm_size(MPI_COMM_WORLD, &nproc); - - if (rank == 0) { - printf("ndoubles=%d,nproc=%d\n", szbuf, nproc); - -#pragma omp parallel - { - //printf("%d cpu\n", sched_getcpu()); - if (omp_get_thread_num() == 0) { - printf("#threads=%d\n", omp_get_num_threads()); - } - } - } - - /* accumulate-to buffer */ - target_buf = malloc(sizeof(double) * szbuf); - if (!target_buf) { - pr_err("Error: allocating target_buf"); - ret = -1; - goto out; - } - memset(target_buf, 0, sizeof(double) * szbuf); - - /* read-from buffer */ - origin_buf = malloc(sizeof(double) * szbuf); - if (!origin_buf) { - pr_err("Error: alloacting origin_buf"); - ret = -1; - goto out; - } - memset(origin_buf, 0, sizeof(double) * szbuf); - - /* fetch-to buffer */ - result = malloc(sizeof(double) * szbuf); - if (!result) { - pr_err("Error: allocating result"); - ret = -1; - goto out; - } - memset(result, 0, sizeof(double) * szbuf); - - /* Expose accumulate-to buffer*/ - ret = MPI_Win_create(target_buf, sizeof(double) * szbuf, sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, &win); - if (ret != 0) { - pr_err("Error: MPI_Win_create returned %d\n", ret); - ret = -1; - goto out; - } - - /* Measure RMA-only time */ - init_buf(origin_buf, result, target_buf, szbuf, rank, 99); - t_comm_ave = measure(rank, nproc, win, origin_buf, result, target_buf, szbuf, 0, 0, 1, NSAMPLES_COMM, NSAMPLES_DROP, 0); - - if (rank == 0) { - printf("t_comm_ave: %.0f %s\n", t_comm_ave * MYTIME_TOUSEC, MYTIME_UNIT); - } - -#ifdef PROFILE - syscall(701, 1 | 2 | 0x80000000); /* syscall profile start */ -#endif - - /* 0: no progress, 1: progress, no uti, 2: progress, uti */ - for (progress = 0; progress <= (disable_syscall_intercept ? 0 : 2); progress += 1) { - - if (progress == 1) { - setenv("DISABLE_UTI", "1", 1); /* Don't use uti_attr and pin to Linux/McKernel CPUs */ - progress_init(); - } else if (progress == 2) { - progress_finalize(); - unsetenv("DISABLE_UTI"); - progress_init(); - } - - if (progress == 1 || progress == 2) { -#ifndef PROGRESS_CALC_PHASE_ONLY - //progress_start(); -#endif - } - - /* RMA-start, compute for T_{RMA} * l / 10, RMA-flush */ - for (l = 0; l <= NROW - 1; l += 1) { - long nsec_calc = (t_comm_ave * MYTIME_TONSEC * l) / 10; - - init_buf(origin_buf, result, target_buf, szbuf, rank, l); - //pr_buf(origin_buf, result, target_buf, szbuf, rank, nproc); - t_total_ave = measure(rank, nproc, win, origin_buf, result, target_buf, szbuf, nsec_calc, progress, 0, NSAMPLES_TOTAL, NSAMPLES_DROP, l / 10.0); - //pr_buf(origin_buf, result, target_buf, szbuf, rank, nproc); - - if (rank == 0) { - - if (l == 0) { - pr_debug("progress=%d\n", progress); - if (progress == 0) { - pr_debug("calc\ttotal\n"); - } else { - pr_debug("total\n"); - } - } - - t_table[l][0] = nsec_calc * (MYTIME_TOUSEC / (double)MYTIME_TONSEC); - if (progress == 0) { - pr_debug("%.0f\t%.0f\n", nsec_calc * (MYTIME_TOUSEC / (double)MYTIME_TONSEC), t_total_ave * MYTIME_TOUSEC); - t_table[l][progress + 1] = t_total_ave * MYTIME_TOUSEC; - } else { - pr_debug("%.0f\n", t_total_ave * MYTIME_TOUSEC); - t_table[l][progress + 1] = t_total_ave * MYTIME_TOUSEC; - } - } - } - - if (progress == 1 || progress == 2) { -#ifndef PROGRESS_CALC_PHASE_ONLY - //progress_stop(); -#endif - } - - } - -#ifdef PROFILE - syscall(701, 4 | 8 | 0x80000000); /* syscall profile report */ -#endif - - if (rank == 0) { - printf("calc,no prog,prog and no uti, prog and uti\n"); - for (l = 0; l <= NROW - 1; l++) { - for (i = 0; i < NCOL; i++) { - if (i > 0) { - printf(","); - } - printf("%.0f", t_table[l][i]); - } - printf("\n"); - } - } - - MPI_Barrier(MPI_COMM_WORLD); - - if (progress >= 1) { - progress_finalize(); - } - - MPI_Finalize(); - ret = 0; -out: - return ret; -} +#define _GNU_SOURCE /* See feature_test_macros(7) */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For SYS_xxx definitions */ +#include +#include +#include +#include +#include "async_progress.h" +#include "util.h" +#include "delay.h" + +#define MYTIME_UNIT "usec" +#define MYTIME_TOUSEC 1000000 +#define MYTIME_TONSEC 1000000000 + +#define NROW 16 /* 0%, 10%, ..., 140% */ +#define NCOL 4 + +#define NSAMPLES_DROP 5/*10*/ +#define NSAMPLES_COMM 10/*20*/ +#define NSAMPLES_TOTAL 10/*20*/ +#define NSAMPLES_INNER 5 + +#define PROGRESS_CALC_PHASE_ONLY + +static inline double mytime(void) +{ + return /*rdtsc_light()*/MPI_Wtime(); +} + +static int ppn = -1; + +void init_buf(double *origin_buf, double *result, double *target_buf, + int szbuf, int rank, int id) +{ + int j; + + for (j = 0; j < szbuf; j++) { + origin_buf[j] = (rank + 1) * 100.0 + (j + 1); + result[j] = (id + 1) * 100000000.0 + (rank + 1) * 10000.0 + + (j + 1); + target_buf[j] = (rank + 1) * 1000000.0 + (j + 1); + } +} + +void pr_buf(double *origin_buf, double *result, double *target_buf, int szbuf, + int rank, int nproc) +{ + int i, j; + + for (i = 0; i < nproc; i++) { + MPI_Barrier(MPI_COMM_WORLD); + + if (i != rank) { + usleep(100000); + continue; + } + + for (j = 0; j < szbuf; j++) { + pr_debug("[%d] origin_buf,j=%d,val=%f\n", + rank, j, origin_buf[j]); + pr_debug("[%d] result,j=%d,val=%f\n", + rank, j, result[j]); + pr_debug("[%d] target_buf,j=%d,val=%f\n", + rank, j, target_buf[j]); + } + } +} + +void rma(int rank, int nproc, MPI_Win win, double *origin_buf, double *result, + int szbuf, long nsec_calc, int async_progress, int sync_progress, + double pct_calc) +{ + int i, j, target_rank; + int completed, ret; + + for (j = 0; j < NSAMPLES_INNER; j++) { + for (i = 1; i < nproc; i++) { + target_rank = (rank + i) % nproc; + + MPI_Get_accumulate(origin_buf, szbuf, MPI_DOUBLE, + result, szbuf, MPI_DOUBLE, + target_rank, + 0, szbuf, MPI_DOUBLE, + MPI_NO_OP, win); +#if 0 + if (sync_progress) { + if ((ret = MPI_Iprobe(MPI_ANY_SOURCE, + MPI_ANY_TAG, + MPI_COMM_WORLD, + &completed, + MPI_STATUS_IGNORE)) != + MPI_SUCCESS) { + pr_err("%s: error: MPI_Iprobe: %d\n", + __func__, ret); + } + } +#endif + } + } + + if (async_progress) { +#ifdef PROGRESS_CALC_PHASE_ONLY + progress_start(); +#endif + } + + ndelay(nsec_calc); + + if (async_progress) { +#ifdef PROGRESS_CALC_PHASE_ONLY + progress_stop(); +#endif + } + +#define MAX2(x, y) ((x) > (y) ? (x) : (y)) + +#if 1 + /* iprobe is 10 times faster than win_flush_local_all, + * 20679 usec / (8*63*5) messages for 8-ppn 8-node case + */ + if (1/*!sync_progress*/) + for ( +#if 1 + j = 0; + j < (async_progress ? + MAX2(NSAMPLES_INNER * (nproc - 1) * + (1.0 - pct_calc), nproc - 1) : + NSAMPLES_INNER * (nproc - 1)); + j++ +#else + j = 0; + j < MAX2(NSAMPLES_INNER * (nproc - 1) * + (1.0 - pct_calc), nproc - 1); + j++ +#endif + ) { + if ((ret = MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, + MPI_COMM_WORLD, &completed, + MPI_STATUS_IGNORE)) != + MPI_SUCCESS) { + pr_err("%s: error: MPI_Iprobe: %d\n", + __func__, ret); + } + } +#endif + + MPI_Win_flush_local_all(win); +} + +double measure(int rank, int nproc, MPI_Win win, double *origin_buf, + double *result, double *target_buf, int szbuf, long nsec_calc, + int async_progress, int sync_progress, int nsamples, + int nsamples_drop, double pct_calc) +{ + int i; + double t_l, t_g, t_sum = 0; + double start, end; + + for (i = 0; i < nsamples + nsamples_drop; i++) { + MPI_Barrier(MPI_COMM_WORLD); + MPI_Win_lock_all(0, win); + + /* Set parameter based on current IPC and frequency */ + ndelay_init(0); + + start = mytime(); + rma(rank, nproc, win, origin_buf, result, szbuf, nsec_calc, + async_progress, sync_progress, pct_calc); + end = mytime(); + + MPI_Win_unlock_all(win); + MPI_Barrier(MPI_COMM_WORLD); + + t_l = end - start; + MPI_Allreduce(&t_l, &t_g, 1, MPI_DOUBLE, MPI_MAX, + MPI_COMM_WORLD); + + if (i < nsamples_drop) { + continue; + } + + t_sum += t_g; + } + return t_sum / nsamples; +} + +int main(int argc, char **argv) +{ + int ret; + int actual; + int rank = -1; + int nproc; + int i, j, progress, l, m; + double *target_buf, *origin_buf, *result; + MPI_Win win; + double t_comm_l, t_comm_g, t_comm_sum, t_comm_ave; + double t_total_l, t_total_g, t_total_sum, t_total_ave; + double t_table[NROW][NCOL]; + int opt; + int szbuf = 1; /* Number of doubles to send */ + struct rusage ru_start, ru_end; + struct timeval tv_start, tv_end; + int disable_syscall_intercept = 0; + + cpu_set_t cpuset; + + //test_set_loglevel(TEST_LOGLEVEL_WARN); + ndelay_init(1); + + while ((opt = getopt(argc, argv, "+p:I:")) != -1) { + switch (opt) { + case 'p': + ppn = atoi(optarg); + break; + case 'I': + disable_syscall_intercept = atoi(optarg); + break; + default: /* '?' */ + printf("unknown option %c\n", optopt); + ret = -1; + goto out; + } + } + + if (ppn == -1) { + pr_err("Error: Specify processes-per-rank with -p"); + ret = -1; + goto out; + } + + MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &actual); + if (actual != MPI_THREAD_MULTIPLE) { + pr_err("Error: MPI_THREAD_MULTIPLE is not available\n"); + ret = -1; + goto out; + } + + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &nproc); + + if (rank == 0) { + printf("ndoubles=%d,nproc=%d\n", szbuf, nproc); + +#pragma omp parallel + { + //printf("%d cpu\n", sched_getcpu()); + if (omp_get_thread_num() == 0) { + printf("#threads=%d\n", omp_get_num_threads()); + } + } + } + + /* accumulate-to buffer */ + target_buf = malloc(sizeof(double) * szbuf); + if (!target_buf) { + pr_err("Error: allocating target_buf"); + ret = -1; + goto out; + } + memset(target_buf, 0, sizeof(double) * szbuf); + + /* read-from buffer */ + origin_buf = malloc(sizeof(double) * szbuf); + if (!origin_buf) { + pr_err("Error: alloacting origin_buf"); + ret = -1; + goto out; + } + memset(origin_buf, 0, sizeof(double) * szbuf); + + /* fetch-to buffer */ + result = malloc(sizeof(double) * szbuf); + if (!result) { + pr_err("Error: allocating result"); + ret = -1; + goto out; + } + memset(result, 0, sizeof(double) * szbuf); + + /* Expose accumulate-to buffer*/ + ret = MPI_Win_create(target_buf, sizeof(double) * szbuf, + sizeof(double), MPI_INFO_NULL, MPI_COMM_WORLD, + &win); + if (ret != 0) { + pr_err("Error: MPI_Win_create returned %d\n", ret); + ret = -1; + goto out; + } + + /* Measure RMA-only time */ + init_buf(origin_buf, result, target_buf, szbuf, rank, 99); + t_comm_ave = measure(rank, nproc, win, origin_buf, result, target_buf, + szbuf, 0, 0, 1, NSAMPLES_COMM, NSAMPLES_DROP, 0); + + if (rank == 0) { + printf("t_comm_ave: %.0f %s\n", + t_comm_ave * MYTIME_TOUSEC, MYTIME_UNIT); + } + +#ifdef PROFILE + syscall(701, 1 | 2 | 0x80000000); /* syscall profile start */ +#endif + + /* 0: no progress, 1: progress, no uti, 2: progress, uti */ + for (progress = 0; progress <= (disable_syscall_intercept ? 0 : 2); + progress += 1) { + + if (progress == 1) { + /* Don't use uti_attr and pin to Linux/McKernel CPUs */ + setenv("DISABLE_UTI", "1", 1); + progress_init(); + } else if (progress == 2) { + progress_finalize(); + unsetenv("DISABLE_UTI"); + progress_init(); + } + + if (progress == 1 || progress == 2) { +#ifndef PROGRESS_CALC_PHASE_ONLY + //progress_start(); +#endif + } + + /* RMA-start, compute for T_{RMA} * l / 10, RMA-flush */ + for (l = 0; l <= NROW - 1; l += 1) { + long nsec_calc = (t_comm_ave * MYTIME_TONSEC * l) / 10; + + init_buf(origin_buf, result, target_buf, szbuf, rank, + l); +#if 0 + pr_buf(origin_buf, result, target_buf, szbuf, rank, + nproc); +#endif + t_total_ave = measure(rank, nproc, win, origin_buf, + result, target_buf, szbuf, + nsec_calc, progress, 0, + NSAMPLES_TOTAL, NSAMPLES_DROP, + l / 10.0); +#if 0 + pr_buf(origin_buf, result, target_buf, szbuf, rank, + nproc); +#endif + + if (rank == 0) { + + if (l == 0) { + pr_debug("progress=%d\n", progress); + if (progress == 0) { + pr_debug("calc\ttotal\n"); + } else { + pr_debug("total\n"); + } + } + + t_table[l][0] = nsec_calc * + (MYTIME_TOUSEC / (double)MYTIME_TONSEC); + if (progress == 0) { + pr_debug("%.0f\t%.0f\n", + nsec_calc * + (MYTIME_TOUSEC / + (double)MYTIME_TONSEC), + t_total_ave * MYTIME_TOUSEC); + t_table[l][progress + 1] = + t_total_ave * MYTIME_TOUSEC; + } else { + pr_debug("%.0f\n", + t_total_ave * MYTIME_TOUSEC); + t_table[l][progress + 1] = + t_total_ave * MYTIME_TOUSEC; + } + } + } + + if (progress == 1 || progress == 2) { +#ifndef PROGRESS_CALC_PHASE_ONLY + //progress_stop(); +#endif + } + + } + +#ifdef PROFILE + syscall(701, 4 | 8 | 0x80000000); /* syscall profile report */ +#endif + + if (rank == 0) { + printf("calc,no prog,prog and no uti, prog and uti\n"); + for (l = 0; l <= NROW - 1; l++) { + for (i = 0; i < NCOL; i++) { + if (i > 0) { + printf(","); + } + printf("%.0f", t_table[l][i]); + } + printf("\n"); + } + } + + MPI_Barrier(MPI_COMM_WORLD); + + if (progress >= 1) { + progress_finalize(); + } + + MPI_Finalize(); + ret = 0; +out: + return ret; +} diff --git a/test/uti/mpi/Makefile b/test/uti/mpi/Makefile index 43418165..64ab4e46 100755 --- a/test/uti/mpi/Makefile +++ b/test/uti/mpi/Makefile @@ -25,18 +25,12 @@ async_progress.o:: async_progress.c util.h $(CC) $(CFLAGS) -I$(UTI_DIR)/include -c $< util.o:: util.c util.h - $(CC) $(CFLAGS) -qopenmp -c $< + $(CC) $(CFLAGS) -c $< -014: 014.o async_progress.o util.o - $(LD) -o $@ $^ $(LDFLAGS) +fwq.o:: fwq.c fwq.h + $(CC) $(CFLAGS) -c $< -015: 015.o async_progress.o - $(LD) -o $@ $^ $(LDFLAGS) - -016: 016.o async_progress.o util.o - $(LD) -o $@ $^ $(LDFLAGS) -qopenmp - -016.o::016.c +delay.o:: delay.c delay.h $(CC) $(CFLAGS) -qopenmp -c $< 011: 011.o @@ -45,10 +39,22 @@ util.o:: util.c util.h 011.o::011.c $(CC) $(CFLAGS) -qopenmp -c $< -%: %.o +014: 014.o async_progress.o util.o delay.o $(LD) -o $@ $^ $(LDFLAGS) -%.o::%.c +015: 015.o async_progress.o + $(LD) -o $@ $^ $(LDFLAGS) + +016: 016.o async_progress.o util.o delay.o + $(LD) -o $@ $^ $(LDFLAGS) -qopenmp + +016.o::016.c + $(CC) $(CFLAGS) -qopenmp -c $< + +%: %.o util.o fwq.o + $(LD) -o $@ $^ $(LDFLAGS) + +%.o:: %.c util.h fwq.h $(CC) $(CFLAGS) -c $< clean: diff --git a/test/uti/mpi/async_progress.c b/test/uti/mpi/async_progress.c index 3034ee28..a77c05f1 100644 --- a/test/uti/mpi/async_progress.c +++ b/test/uti/mpi/async_progress.c @@ -43,7 +43,7 @@ static int progress_refc; if (count < NROW_STAT) { \ array[count++] += (end - start); \ } \ -} while(0) +} while (0) static int cyc_prog1_count, cyc_prog2_count, cyc_init1_count, cyc_init2_count, cyc_start_count, cyc_stop1_count, cyc_stop2_count, cyc_stop3_count, cyc_finalize_count; static unsigned long cyc_prog1[NROW_STAT]; @@ -266,17 +266,17 @@ void progress_init() pr_err("%s: error: pthread_cond_init failed (%d)\n", __func__, ret); goto out; } - + if ((ret = pthread_attr_init(&pthread_attr))) { pr_err("%s: error: pthread_attr_init failed (%d)\n", __func__, ret); goto out; } - + if ((ret = uti_attr_init(&uti_attr))) { pr_err("%s: error: uti_attr_init failed (%d)\n", __func__, ret); goto out; } - + #if 0 if ((ret = UTI_ATTR_SAME_L1(&uti_attr))) { pr_err("%s: error: UTI_ATTR_SAME_L1 failed\n", __func__); @@ -294,7 +294,7 @@ void progress_init() end = rdtsc_light(); RECORD_STAT(cyc_init1_count, cyc_init1, end, start); #endif - + #ifdef PROFILE start = rdtsc_light(); #endif @@ -355,7 +355,7 @@ void progress_start() progress_flag_down = 1; pthread_cond_signal(&progress_cond_down); pthread_mutex_unlock(&progress_mutex); - + #ifdef PROFILE end = rdtsc_light(); RECORD_STAT(cyc_start_count, cyc_start, end, start); diff --git a/test/uti/mpi/fwq.h b/test/uti/mpi/fwq.h new file mode 100644 index 00000000..21be9ea5 --- /dev/null +++ b/test/uti/mpi/fwq.h @@ -0,0 +1,29 @@ +#ifndef __FWQ_H_INCLUDED__ +#define __FWQ_H_INCLUDED__ + +static inline void fixed_size_work(void) +{ + asm volatile( + "movq $0, %%rcx\n\t" + "1:\t" + "addq $1, %%rcx\n\t" + "cmpq $99, %%rcx\n\t" + "jle 1b\n\t" + : + : + : "rcx", "cc"); +} + +static inline void bulk_fsw(unsigned long n) +{ + int j; + + for (j = 0; j < (n); j++) { + fixed_size_work(); + } +} + +void fwq_init(void); +void fwq(long delay_nsec); + +#endif diff --git a/test/uti/mpi/util.c b/test/uti/mpi/util.c index cdf51140..fc408bd6 100644 --- a/test/uti/mpi/util.c +++ b/test/uti/mpi/util.c @@ -15,145 +15,39 @@ /* Messaging */ enum test_loglevel test_loglevel = TEST_LOGLEVEL_DEBUG; -/* Calculation */ -static inline void asmloop(unsigned long n) { - int j; - - for (j = 0; j < n; j++) { - asm volatile( - "movq $0, %%rcx\n\t" - "1:\t" - "addq $1, %%rcx\n\t" - "cmpq $99, %%rcx\n\t" - "jle 1b\n\t" - : - : - : "rcx", "cc"); - } -} - -#define N_INIT 10000000 -double nspw; /* nsec per work */ - -void ndelay_init(int verbose) { - struct timeval start, end; - - //clock_gettime(TIMER_KIND, &start); - gettimeofday(&start, NULL); - -#pragma omp parallel - { - asmloop(N_INIT); - } - - //clock_gettime(TIMER_KIND, &end); - gettimeofday(&end, NULL); - - nspw = DIFFUSEC(end, start) * 1000 / (double)N_INIT; - if (verbose) { - pr_debug("nspw=%f\n", nspw); - } -} - -#if 1 -void ndelay(long delay_nsec) { - if (delay_nsec < 0) { - printf("delay_nsec < 0\n"); - return; - } -#pragma omp parallel - { - asmloop(delay_nsec / nspw); - } -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void ndelay(long delay_nsec) { - struct timespec start, end; - - if (delay_nsec < 0) { return; } - clock_gettime(TIMER_KIND, &start); - - while (1) { - clock_gettime(TIMER_KIND, &end); - if (DIFFNSEC(end, start) >= delay_nsec) { - break; - } - asmloop(2); /* ~150 ns per iteration on FOP */ - } -} -#endif - - -double cycpw; /* cyc per work */ - -void cdlay_init() { - unsigned long start, end; - - start = rdtsc_light(); -#define N_INIT 10000000 - asmloop(N_INIT); - end = rdtsc_light(); - cycpw = (end - start) / (double)N_INIT; -} - -#if 0 -void cdelay(long delay_cyc) { - if (delay_cyc < 0) { - return; - } - asmloop(delay_cyc / cycpw); -} -#else /* For machines with large core-to-core performance variation (e.g. OFP) */ -void cdelay(long delay_cyc) { - unsigned long start, end; - - if (delay_cyc < 0) { return; } - start = rdtsc_light(); - - while (1) { - end = rdtsc_light(); - if (end - start >= delay_cyc) { - break; - } - asmloop(2); - } -} -#endif - - int print_cpu_last_executed_on(const char *name) { char fn[256]; - char* result; + char *result; pid_t tid = syscall(SYS_gettid); int fd; int offset; - int mpi_errno = 0; + int mpi_errno = 0; int rc; sprintf(fn, "/proc/%d/task/%d/stat", getpid(), (int)tid); //printf("fn=%s\n", fn); fd = open(fn, O_RDONLY); - if(fd == -1) { + if (fd == -1) { printf("open() failed\n"); goto fn_fail; } result = malloc(65536); - if(result == NULL) { + if (result == NULL) { printf("malloc() failed"); goto fn_fail; } int amount = 0; offset = 0; - while(1) { + while (1) { amount = read(fd, result + offset, 65536); // printf("amount=%d\n", amount); - if(amount == -1) { + if (amount == -1) { printf("read() failed"); goto fn_fail; } - if(amount == 0) { + if (amount == 0) { goto eof; } offset += amount; @@ -161,21 +55,21 @@ int print_cpu_last_executed_on(const char *name) { eof:; //printf("result:%s\n", result); - char* next_delim = result; - char* field; + char *next_delim = result; + char *field; int i; - for(i = 0; i < 39; i++) { + for (i = 0; i < 39; i++) { field = strsep(&next_delim, " "); } int cpu = sched_getcpu(); - if(cpu == -1) { + if (cpu == -1) { printf("getpu() failed\n"); goto fn_fail; } rc = syscall(732); - + printf("%s: pmi_rank=%02d,os=%s,stat-cpu=%02d,sched_getcpu=%02d,tid=%d\n", name, atoi(getenv("PMI_RANK")), rc == -1 ? "lin" : "mck", atoi(field), cpu, tid); fflush(stdout); fn_exit: free(result); diff --git a/test/uti/mpi/util.h b/test/uti/mpi/util.h index 3482aae3..15688c8f 100644 --- a/test/uti/mpi/util.h +++ b/test/uti/mpi/util.h @@ -61,13 +61,7 @@ inline uint64_t rdtsc_light(void) #define DIFFNSEC(end, start) ((end.tv_sec - start.tv_sec) * 1000000000UL + (end.tv_nsec - start.tv_nsec)) #define TIMER_KIND CLOCK_MONOTONIC_RAW /* CLOCK_THREAD_CPUTIME_ID */ -/* Calculation emulation */ -void ndelay_init(); -void ndelay(long delay_nsec); -void cdelay_init(); -void cdelay(long delay_cyc); - /* CPU location */ -int print_cpu_last_executed_on(); +int print_cpu_last_executed_on(const char *name); #endif