henfredemars

joined 1 year ago
[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (1 children)

Call it a difference of opinion that I don’t believe it should try to be bit-accurate for floating point. But, it’s a valid position to take. There are many use cases for QEMU. In this case where we emit some host instructions I do believe it’s still within the helper function instead of inline which is not ideal. The guest code using floating point in the first place to me implies some degree of inaccuracy is permissible and this is the position that some cross architecture game emulators take. But again, I suppose it can depend what code you wish to run.

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago) (5 children)

Yes indeed. I develop QEMU at work mainly implementation of new hardware as needed for my employer. It has a software emulator, but it’s not very good. It’s acceptable.

The instruction generation backend does not seem to prioritize performance. Instead, it prioritizes accuracy and ease of maintenance. There is low-hanging fruit for making it faster but there isn’t much interest in doing so for the TCG backend. The attitude seems to be that it’s good enough.

For a small example, you may find it interesting that QEMU does not implement floating point acceleration. It’s done in software even though the host has floating point instructions. It usually doesn’t attempt to use those floating point hardware facilities on the host and instead execute many hundreds of instructions to do floating point using the Berkeley software implementation. Almost never does this matter but it costs a lot of performance. Compare this to the translation performed by projects like FEX and Box64 which do and blow QEMU out of the water for specific use cases.

Another place in the emulator that could be improved is handling of executable pages or cached output of the backend code generator. The executable code caching mechanism is very simple and could probably be much more aggressive on today’s systems.

If you examine change logs, TCG really doesn’t get much TLC last time I checked. It could be a better emulator but performance outside of KVM use case is not as important to the project.

[–] [email protected] 1 points 1 month ago

You and me both. The pop ups have evolved, and so have the pop-up blockers (now, mostly built into ad-blockers).

[–] [email protected] 5 points 1 month ago (7 children)

It is pretty cool! QEMU can do all kinds of interesting things, although I do wish it had better performance. High performance doesn't appear to be a primary goal for QEMU outside of using KVM.

[–] [email protected] 51 points 1 month ago (12 children)

Injection of money more often than not does not solve the fundamental problems that lead a business to failure or in this case poor performance. The causes of the poor decisions along the way must also be addressed.

[–] [email protected] 5 points 1 month ago (9 children)

Interesting running it in QEMU. If possible, it might be better to use a container if the host kernel supports this because performance and resource consumption should both be significantly improved.

However, an emulator provides great flexibility I'll give you that.

[–] [email protected] 10 points 1 month ago (1 children)

The placement is so precise and soothing.

[–] [email protected] 5 points 1 month ago

I’m not sure this is the same problem as a community that has gone offline or was scrubbed in some way. A community that’s inactive or not being properly maintained sounds like a different kind of problem. In this case, we mainly just hope that the federative design means such communities eventually get replaced by people who want a better community, possibly on another server entirely.

I can imagine someone writing a bot or script to detect dead communities.

[–] [email protected] 2 points 1 month ago

This has been done to a limited extent. Some compilers can check for common cases and you can enforce these warnings as errors. However, this is generally not possible as others have described because the language itself has behaviors that are not safe, and too much code relies on those properties that are fundamentally unsafe.

[–] [email protected] 4 points 1 month ago

I’d like to add that there’s a difference between unsafe and unspecified behavior. Sometimes I’d like the compiler to produce my unsafe code that has specified behavior. In this case, I want the compiler to produce exactly that unsafe behavior that was specified according to the language semantics.

Especially when developing a kernel or in an embedded system, an example would be code that references a pointer from a hardcoded constant address. Perhaps this code then performs pointer arithmetic to access other addresses. It’s clear what the code should literally do, but it’s quite an unsafe thing to do unless you as the developer have some special knowledge that you know the address is accessible and contains data that makes sense to be processed in such a manner. This can be the case when interacting directly with registers representing some physical device or peripheral, but of course, there’s nothing in the language that would suggest doing this is safe. It’s making dangerous assumptions that are not enforced as part of the program. Those assumptions are only true in the program is running on the hardware that makes this a valid thing to do, where that magical address and offsets to that address do represent something I can read in memory.

Of course, pointer arithmetic can be quite dangerous, but I think the point still stands that behavior can be specified and unsafe in a sense.

[–] [email protected] 18 points 1 month ago (3 children)

And why do we have to do these with pop-ups? Just put it on the page somewhere. If I care enough to read your content regularly then I’ll see the notice.

[–] [email protected] 5 points 1 month ago

That’s cheating!

view more: ‹ prev next ›