Resolved some synchronization problems between jni and device driver and overhead by too frequent system call.