performance: call ioctl() less often