All of lore.kernel.org
 help / color / mirror / Atom feed
* syscall problem on Android x86
@ 2013-04-26 17:43 Akers, Jason B
  2013-04-26 18:17 ` Jens Axboe
  2013-04-27  1:59 ` Aaron Carroll
  0 siblings, 2 replies; 9+ messages in thread
From: Akers, Jason B @ 2013-04-26 17:43 UTC (permalink / raw)
  To: fio@vger.kernel.org

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-04-29 18:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-26 17:43 syscall problem on Android x86 Akers, Jason B
2013-04-26 18:17 ` Jens Axboe
2013-04-26 19:46   ` Akers, Jason B
2013-04-26 20:04     ` Jens Axboe
2013-04-26 20:35       ` Akers, Jason B
2013-04-26 20:42         ` Jens Axboe
2013-04-27  1:59 ` Aaron Carroll
2013-04-27  2:27   ` Jens Axboe
2013-04-29 18:16     ` Akers, Jason B

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.