3 ms·
Transparent DBT for userspace programs has been a thing on Linux the whole time, more or less. QEMU could stand to do a lot better performance-wise, though, for
by microcolonel 6y ago
Transparent DBT for userspace programs has been a thing on Linux the whole time, more or less. QEMU could stand to do a lot better performance-wise, though, for programs that actually care about that.
- saagarjha 6y agoQEMU is bordering on unusably slow even for applications that are not performance sensitive, mostly because of memory ordering issues. TSO is not really easy to do dynamically.
- microcolonel 6y agoYeah, my primary use case for it has been running proprietary utilities to inspect/operate hard disks, and things like that, which may only be available as statically-linked ia32 binaries, potentially until the end of time. There is a lot of performance left on the floor by real-time-only DBT when applied to binaries which do not jump into dynamic memory at all. QEMU is also, in my opinion, too general-purpose to be efficient. I think high-performance SBT and DBT is crucial to the adoption of new ISAs, it should maybe be something RISC-V International/The Linux Foundation puts up a bounty for (along with native ports of popular JITs like v8 and HotSpot).
- hedora 6y agoOff topic: I have a scanner with excellent x86 32/64 bit linux drivers. Has someone come up with a smooth way to use them on ARM? (The leading contender is a qemu chroot with the scanner gui and driver installed, but that sounds hard to maintain over time). I really want to just link the x86 .so into an arm binary, performance-be-damned.
- microcolonel 6y agoSorry, now I see you wrote scanner and not printer so here is my response to printer : ---- You could put it in a container, and connect it with CUPS. CUPS is network-transparent and there should be nothing stopping you from running it in a container. It is not unheard of to use QEMU userspace DBT in containers[0]. [0]: https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ https://www.stereolabs.com/docs/docker/building-arm-containe...
- microcolonel 6y agoIf your scanner drivers hook into SANE, I think saned supports sharing a local scanner over the network, so you could set that up in a container, similar to setting up CUPS in a container for printer drivers. Here's the document for setting that up: https://wiki.debian.org/SaneOverNetwork https://wiki.debian.org/SaneOverNetwork A container is nice because you can also be sure that the scanner container only exposes the saned socket, and has no other network access.
- hedora 6y agoThanks! I wonder how hard it is to set up an x86 container on ARM. It seems like qemu’s transparent binary emulation should make it easy + clean.