syscall problem on Android x86

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fio hangs when run on the Android x86 emulator.

Tracking through, I found that the last call made is shmget() (in init.c - setup_thread_area()).
I believe that the hang is related to the fio syscall implementation for x86.

os-android.h defines shmget as: syscall(__NR_shmget, __key, __size, __shmflg);

In arch-x86.h __NR_shmget is defined to 29. This was added on April 11th (a415b2cc).

Looking deeper, I see that syscall 29 is actually mapped to pause(). (see SYSCALLS.TXT in bionic/libc) I confirmed that sys_pause() was being called by using a kernel breakpoint. This explains why fio hangs.

Now the question is: What to do about it?
For some reason shmget is only exposed for Android ARM targets even though it is part of the kernel (system.map) for x86.

I see two options:
1. add shmget to SYSCALLS.TXT for x86 and recompile. Remove the hardcoded __NR_shmget from arch-x86.h and put a #error instead to warn others that a kernel patch is necessary for Android x86. 

2. use a "blessed" shared memory allocation method for Android targets (like ashmem / mmap??) Not sure how difficult it would be to make this work with the existing FIO architecture.

Any other ideas / thoughts / feedback / suggestions are appreciated.

Thanks,
Jason Akers


--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux