-
Couldn't load subscription status.
- Fork 293
Add 'threads_per_core' in 'Host.cpu_info' #5464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Discussed here: xapi-project#5462 Signed-off-by: Benjamin Reis <benjamin.reis@vates.tech>
0087026 to
79a0ab5
Compare
|
@andyhhp I know you have ideas about exposing CPU topologies... does this proposal fit? |
|
Right now it's going to give you some quite creative (mis)truths. We have plans, but there's quite a lot of upstream Xen work required before we can provide good accurate information here. @benjamreis What precisely are you looking for here? I presume some kind of "is SMT activate or not?" |
|
For Windows server licenses or other Oracle-like commercial reasons, people need to have the number of real physical cores on a machine. If it works 80% of the time, it might be enough. On the hardware we tested, it seems to be right. |
|
Thx for the answer Olivier. Tested: and compared to: |
|
Right, but note how https://ark.intel.com/content/www/us/en/ark/products/75270.html is 10 cores and 20 threads. |
|
And we are missing a core_count also, if cpu_count isn't that :) |
|
@andyhhp that's an example in a nested VM. The result of xl works fine in the "real" dom0: |
And what value do you want to get when you turn HT/SMT off in the firmware? (Hint, you'll get different behaviour on Intel and AMD when trying this.) What value do you expect to get when booting Xen with What behaviour do you want if someone runs |
|
I don't think our target (ie people using this number for inventory/licensing reasons, NOT security) will ever do |
|
I would be fine to merge this if we understand that these numbers don't mean much in a virtual environment. |
|
@lindig what do you mean exactly? it's just exposing something already exposed by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've talked to Andy about this. Generally speaking, there is a lot to improve in the way we expose CPU topology info. However, this is passing on data from Xen that fits within the context of what is already there. So it's fine to add it, if we acknowledge and accept its limitations.
|
I'm not saying you are inventing numbers but is the number XL presents even well defined? @andyhhp's comments suggests to me that what we think and what code using that number thinks it means could be different. And you are adding this because you want some code to use it, I assume. |
|
Sorry for answering later than I wanted: in short, we don't want any code to "use it" (in a way to do any computation), we just want to expose it in XO (web UI, CLI or API), so our users can do whatever they want with it 🙂 I already know that it's mostly for display purpose/being aware of the reported topology for licensing/reporting reasons. So even if it's not perfectly correct in all cases, it won't be used for anything critical itself. |
Discussed here: #5462