ssrg-vt / popcorn-kernel

Popcorn Linux kernel for distributed thread execution
Other
156 stars 23 forks source link

arm64 migration has a weird destination id #70

Closed xjtuwxg closed 5 years ago

xjtuwxg commented 5 years ago

Maybe this is my misconfiguration, just to record it. I only enabled the "Task Migration" log (aka, the process server log).

I run basic.c, on node 1 the log shows invalid migration destination -941357216. I'm not sure whether this is related with the bugs on arm64:

popcorn@arm02:~$ [  137.626098] remote_worker_main: [244] for [248/0]
[  137.626591] remote_worker_main: [244] /home/popcorn/basic
[  137.638692]
[  137.638692] ####### MIGRATED - [245/1] from [248/0]
[  137.658965] ####### MIGRATE [245] to -941357216
[  137.659259]   [245] invalid migration destination -941357216
[  137.659635] ####### MIGRATE [245] to 1
[  137.659816]   [245] already running at the destination 1
[  137.695858] WARNING: CPU: 0 PID: 245 at fs/read_write.c:604 ksys_write+0xe8/0x110
[  137.696642] Modules linked in: msg_socket
[  137.697591] CPU: 0 PID: 245 Comm: basic Not tainted 4.19.0-rc5-popcorn+ #150
[  137.698176] Hardware name: linux,dummy-virt (DT)
[  137.698727] pstate: 40000005 (nZcv daif -PAN -UAO)
[  137.699052] pc : ksys_write+0xe8/0x110
[  137.699306] lr : ksys_write+0x44/0x110

The vanilla popcorn also has a similar print ####### MIGRATE [229] to -5952. The code run correctly:

popcorn@arm02:~$ [   31.285855] remote_worker_main: [228] for [229/0]
[   31.286241] remote_worker_main: [228] /home/popcorn/basic
[   31.293237]
[   31.293237] ####### MIGRATED - [229/1] from [229/0]
[   31.353632] ####### MIGRATE [229] to -5952
[   31.353910]   [229] invalid migration destination -5952
[   31.354270] ####### MIGRATE [229] to 1
[   31.354460]   [229] already running at the destination 1
[   31.400469] EXITED [229] remote / 0x4000
[   31.406335]
[   31.406335] TERMINATE [228] with 0x4000
[   31.406782] EXITED [228] remote worker / 0x4000
xjtuwxg commented 5 years ago

Seems like a cross-compiler issue. Compile the code inside the arm64 VM works.

xjtuwxg commented 5 years ago

I cross-compiled the popcorn-kernel-lib/src/basic.c with:

$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516

When running the code, on the remote node, I got this weired log. Even after fixed issue 69, 72.

[ 6738.144021] ## PAGEFAULT [284] fffff0d15000 W 4006ec 55 0
[ 6738.144434]  =[284] fffff0d15000 00000000005a9a64
[ 6738.144684]   [284] ->[283/0] fffff0d15000 4006ec
[ 6738.148733]   [284] <-[283/0] fffff0d15000 0
[ 6738.149945] >>[284] fffff0d15000 00000000005a9a64
[ 6738.150562]
[ 6738.150562] ## PAGEFAULT [284] 416000 R 4163c0 54 0
[ 6738.151098]   [284] VM_EXEC. continue
[ 6738.152024] ####### MIGRATE [284] to -254716384
[ 6738.152474]   [284] invalid migration destination -254716384
[ 6738.153094] ####### MIGRATE [284] to 1
[ 6738.153784]   [284] already running at the destination 1